From 4af23f7cc17397656d0aa6a90ab4265b26731c54 Mon Sep 17 00:00:00 2001 From: Luis Cantero Date: Tue, 28 Nov 2023 15:24:10 +0100 Subject: [PATCH] Fix loglevel options (#323) * Fix new log levels * Update readme --- README.md | 13 +++++++------ src/CliOptions.cs | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ac3f4339..251188b6 100644 --- a/README.md +++ b/README.md @@ -292,8 +292,8 @@ Options: the timespan in seconds when the logfile should be flushed. Default: 00:00:30 sec - --ll, --loglevel=VALUE the loglevel to use (allowed: fatal, error, warn, - info, debug, verbose). + --ll, --loglevel=VALUE the loglevel to use (allowed: critical, error, + warn, info, debug, trace). Default: info --sc, --simulationcyclecount=VALUE count of cycles in one simulation phase @@ -337,14 +337,15 @@ Options: --to, --trustowncert the own certificate is put into the trusted certificate store automatically. Default: False - --msec, --maxsessioncount + --msec, --maxsessioncount=VALUE maximum number of parallel sessions. Default: 100 - --msuc, --maxsubscriptioncount + --msuc, --maxsubscriptioncount=VALUE maximum number of subscriptions. Default: 100 - --mqrc, --maxqueuedrequestcount - maximum number of requests that will be queued waiting for a thread. + --mqrc, --maxqueuedrequestcount=VALUE + maximum number of requests that will be queued + waiting for a thread. Default: 2000 --at, --appcertstoretype=VALUE the own application cert store type. diff --git a/src/CliOptions.cs b/src/CliOptions.cs index 15252609..372e34df 100644 --- a/src/CliOptions.cs +++ b/src/CliOptions.cs @@ -32,7 +32,7 @@ public static Mono.Options.OptionSet InitCommandLineOptions() } } }, - { "ll|loglevel=", "the loglevel to use (allowed: critical, warn, info, debug, trace).\nDefault: info", (string s) => { + { "ll|loglevel=", "the loglevel to use (allowed: critical, error, warn, info, debug, trace).\nDefault: info", (string s) => { var logLevels = new List {"critical", "error", "warn", "info", "debug", "trace"}; if (logLevels.Contains(s.ToLowerInvariant())) { @@ -40,7 +40,7 @@ public static Mono.Options.OptionSet InitCommandLineOptions() } else { - throw new OptionException("The loglevel must be one of: fatal, error, warn, info, debug, verbose", "loglevel"); + throw new OptionException($"The loglevel must be one of: {string.Join(", ", logLevels)}", "loglevel"); } } },