mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-08 22:26:51 +02:00
Merge pull request #5244 from Sko0owi/logLocationBeta
Adding flag for changing location of logs for VCMI client
This commit is contained in:
@@ -158,6 +158,7 @@ int main(int argc, char * argv[])
|
||||
("version,v", "display version information and exit")
|
||||
("testmap", po::value<std::string>(), "")
|
||||
("testsave", po::value<std::string>(), "")
|
||||
("logLocation", po::value<std::string>(), "new location for log files")
|
||||
("spectate,s", "enable spectator interface for AI-only games")
|
||||
("spectate-ignore-hero", "wont follow heroes on adventure map")
|
||||
("spectate-hero-speed", po::value<int>(), "hero movement speed on adventure map")
|
||||
@@ -225,7 +226,9 @@ int main(int argc, char * argv[])
|
||||
#endif
|
||||
|
||||
setThreadNameLoggingOnly("MainGUI");
|
||||
const boost::filesystem::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Client_log.txt";
|
||||
boost::filesystem::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Client_log.txt";
|
||||
if(vm.count("logLocation"))
|
||||
logPath = vm["logLocation"].as<std::string>() + "/VCMI_Client_log.txt";
|
||||
logConfig = new CBasicLogConfigurator(logPath, console);
|
||||
logConfig->configureDefault();
|
||||
logGlobal->info("Starting client of '%s'", GameConstants::VCMI_VERSION);
|
||||
|
Reference in New Issue
Block a user