From 501a1ff489a4c46045200012fa4f89c5a0fa865d Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 28 Mar 2021 22:27:27 +1100 Subject: [PATCH] Updated parsers to allow GUI to run implicitly for -v, -vv and --print- source options * Added cfg_args counter for each in cli_pre_detection() * Added each to the ignore options in ProcessOptions() * Includes slight update to OptionHelp() --- cli.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cli.cpp b/cli.cpp index 2f8e0e92..f30c6e82 100644 --- a/cli.cpp +++ b/cli.cpp @@ -381,7 +381,7 @@ void OptionHelp() help_text += "--config path Use a custom path instead of the global configuration directory.\n"; help_text += "--nodetect Do not try to detect hardware at startup.\n"; help_text += "--noautoconnect Do not try to autoconnect to a local server at startup.\n"; - help_text += "--loglevel Set the log level (0: critical to 6: debug).\n"; + help_text += "--loglevel [0-6 | error | warning ...] Set the log level (0: critical to 6: debug).\n"; help_text += "--print-source Print the source code file and line number for each log entry.\n"; help_text += "-v, --verbose Print log messages to stdout.\n"; help_text += "-vv, --very-verbose Print debug messages and log messages to stdout.\n"; @@ -808,8 +808,11 @@ int ProcessOptions(int argc, char *argv[], Options *options, std::vectorsetVerbosity(LL_VERBOSE); + cfg_args++; } /*---------------------------------------------------------*\ @@ -1220,6 +1224,7 @@ unsigned int cli_pre_detection(int argc, char *argv[]) else if(option == "--very-verbose" || option == "-vv") { LogManager::get()->setVerbosity(LL_DEBUG); + cfg_args++; } /*---------------------------------------------------------*\ @@ -1228,6 +1233,7 @@ unsigned int cli_pre_detection(int argc, char *argv[]) else if(option == "--print-source") { LogManager::get()->setPrintSource(true); + cfg_args++; } /*---------------------------------------------------------*\