Selaa lähdekoodia

Logging: always print version of client and server in the begining

Arseniy Shestakov 9 vuotta sitten
vanhempi
sitoutus
15b4774076
2 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 1 1
      client/CMT.cpp
  2. 1 0
      server/CVCMIServer.cpp

+ 1 - 1
client/CMT.cpp

@@ -300,6 +300,7 @@ int main(int argc, char** argv)
 	const bfs::path logPath = VCMIDirs::get().userCachePath() / "VCMI_Client_log.txt";
 	CBasicLogConfigurator logConfig(logPath, console);
 	logConfig.configureDefault();
+	logGlobal->infoStream() << NAME;
 	logGlobal->infoStream() << "Creating console and configuring logger: " << pomtime.getDiff();
 	logGlobal->infoStream() << "The log file will be saved to " << logPath;
 
@@ -342,7 +343,6 @@ int main(int argc, char** argv)
 
 	conf.init();
 	logGlobal->infoStream() << "Loading settings: " << pomtime.getDiff();
-	logGlobal->infoStream() << NAME;
 
 	srand ( time(nullptr) );
 

+ 1 - 0
server/CVCMIServer.cpp

@@ -577,6 +577,7 @@ int main(int argc, char** argv)
 	console = new CConsoleHandler;
 	CBasicLogConfigurator logConfig(VCMIDirs::get().userCachePath() / "VCMI_Server_log.txt", console);
 	logConfig.configureDefault();
+	logGlobal->info(NAME);
 
 	handleCommandOptions(argc, argv);
 	if(cmdLineOptions.count("port"))