From 832298e7aaee884393d8f80e5a374fa652b4cb68 Mon Sep 17 00:00:00 2001 From: worktycho Date: Sat, 1 Apr 2017 16:28:42 +0100 Subject: Add command line argument for disabling the logfile --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 4ae54511b..de194dc64 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -391,6 +391,7 @@ static std::unique_ptr ParseArguments(int argc, char TCLAP::SwitchArg crashDumpFull ("", "crash-dump-full", "Crashdumps created by the server will contain full server memory", cmd); TCLAP::SwitchArg crashDumpGlobals("", "crash-dump-globals", "Crashdumps created by the server will contain the global variables' values", cmd); TCLAP::SwitchArg noBufArg ("", "no-output-buffering", "Disable output buffering", cmd); + TCLAP::SwitchArg noFileLogArg ("", "no-log-file", "Disable logging to file", cmd); TCLAP::SwitchArg runAsServiceArg ("d", "service", "Run as a service on Windows, or daemon on UNIX like systems", cmd); cmd.parse(argc, argv); @@ -413,6 +414,10 @@ static std::unique_ptr ParseArguments(int argc, char repo->AddValue("Server", "Ports", std::to_string(port)); } } + if (noFileLogArg.getValue()) + { + repo->AddValue("Server", "DisableLogFile", true); + } if (commLogArg.getValue()) { g_ShouldLogCommIn = true; -- cgit v1.2.3