aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5ea212d8a..ddd725134 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -453,14 +453,6 @@ static bool setup_log_params(const Settings &cmd_args)
}
}
- // If trace is enabled, enable logging of certain things
- if (cmd_args.getFlag("trace")) {
- dstream << _("Enabling trace level debug output") << std::endl;
- g_logger.setTraceEnabled(true);
- dout_con_ptr = &verbosestream; // This is somewhat old
- socket_enable_debug_output = true; // Sockets doesn't use log.h
- }
-
// In certain cases, output info level on stderr
if (cmd_args.getFlag("info") || cmd_args.getFlag("verbose") ||
cmd_args.getFlag("trace") || cmd_args.getFlag("speedtests"))
@@ -470,6 +462,12 @@ static bool setup_log_params(const Settings &cmd_args)
if (cmd_args.getFlag("verbose") || cmd_args.getFlag("trace"))
g_logger.addOutput(&stderr_output, LL_VERBOSE);
+ if (cmd_args.getFlag("trace")) {
+ dstream << _("Enabling trace level debug output") << std::endl;
+ g_logger.addOutput(&stderr_output, LL_TRACE);
+ socket_enable_debug_output = true;
+ }
+
return true;
}
@@ -599,7 +597,7 @@ static void init_log_streams(const Settings &cmd_args)
warningstream << "Deprecated use of debug_log_level with an "
"integer value; please update your configuration." << std::endl;
static const char *lev_name[] =
- {"", "error", "action", "info", "verbose"};
+ {"", "error", "action", "info", "verbose", "trace"};
int lev_i = atoi(conf_loglev.c_str());
if (lev_i < 0 || lev_i >= (int)ARRLEN(lev_name)) {
warningstream << "Supplied invalid debug_log_level!"