Skip to content

Commit

Permalink
Improve disable logs option
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Sep 1, 2024
1 parent 2ec278e commit 32a8b8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/proxy_server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ int main(int argc, char** argv)
("autoindex", po::value<bool>(&autoindex)->default_value(false, "false"), "Enable directory listing.")
("logs_path", po::value<std::string>(&log_dir)->value_name(""), "Specify directory for log files.")

("disable_logs", po::value<bool>(&disable_logs)->value_name(""), "Disable logging.")
("disable_logs", po::value<bool>(&disable_logs)->value_name("")->default_value(false), "Disable logging.")
("disable_http", po::value<bool>(&disable_http)->value_name("")->default_value(false, "false"), "Disable HTTP protocol.")
("disable_socks", po::value<bool>(&disable_socks)->value_name("")->default_value(false, "false"), "Disable SOCKS proxy protocol.")
("disable_udp", po::value<bool>(&disable_udp)->value_name("")->default_value(false, "false"), "Disable UDP protocol.")
Expand Down Expand Up @@ -380,11 +380,11 @@ and/or open issues at https://github.com/Jackarain/proxy)"
auto cfg = po::parse_config_file(config.c_str(), desc, false);
po::store(cfg, vm);
po::notify(vm);

if (disable_logs)
xlogger::toggle_write_logging(true);
}

if (disable_logs)
xlogger::toggle_write_logging(true);

xlogger::init_logging(log_dir);

print_args(argc, argv, vm);
Expand Down

0 comments on commit 32a8b8a

Please sign in to comment.