From 60d07f2eb6dafd6294488f4c6b1e2dcbd6c64113 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 1 Jun 2023 06:55:21 +0200 Subject: [PATCH] changes default loglevel to info for tgc-sim --- src/main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e2b7850..a3999ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) { // clang-format off desc.add_options() ("help,h", "Print help message") - ("verbose,v", po::value()->implicit_value(0), "Sets logging verbosity") + ("verbose,v", po::value()->default_value(4), "Sets logging verbosity") ("logfile,l", po::value(), "Sets default log file.") ("disass,d", po::value()->implicit_value(""), "Enables disassembly") ("gdb-port,g", po::value()->default_value(0), "enable gdb server and specify port to use") @@ -93,11 +93,9 @@ int main(int argc, char *argv[]) { LOGGER(DEFAULT)::print_time() = false; LOGGER(connection)::print_time() = false; - if (clim.count("verbose")) { - auto l = logging::as_log_level(clim["verbose"].as()); - LOGGER(DEFAULT)::reporting_level() = l; - LOGGER(connection)::reporting_level() = l; - } + auto l = logging::as_log_level(clim["verbose"].as()); + LOGGER(DEFAULT)::reporting_level() = l; + LOGGER(connection)::reporting_level() = l; if (clim.count("logfile")) { // configure the connection logger auto f = fopen(clim["logfile"].as().c_str(), "w");