Skip to content

Commit 2a4aa6e

Browse files
committed
Improve disable_logs and logs_path params
1 parent 437e19f commit 2a4aa6e

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

server/proxy_server/main.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,20 @@ and/or open issues at https://github.com/Jackarain/proxy)"
406406
po::notify(vm);
407407
}
408408

409-
if (disable_logs || log_dir.empty())
410-
xlogger::toggle_write_logging(false);
409+
if (disable_logs && log_dir.empty())
410+
{
411+
xlogger::turnoff_logging();
412+
}
411413
else
412-
xlogger::init_logging(log_dir);
414+
{
415+
if (log_dir.empty())
416+
xlogger::toggle_write_logging(false);
417+
else
418+
xlogger::init_logging(log_dir);
419+
420+
if (disable_logs)
421+
xlogger::toggle_console_logging(false);
422+
}
413423

414424
print_args(argc, argv, vm);
415425

0 commit comments

Comments
 (0)