mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Fix build, reduce includes of CConsoleHandler
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "../client/windows/CMessage.h"
|
||||
#include "../client/windows/InfoWindows.h"
|
||||
|
||||
#include "../lib/CConsoleHandler.h"
|
||||
#include "../lib/CThreadHelper.h"
|
||||
#include "../lib/ExceptionsCommon.h"
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
@@ -227,12 +228,12 @@ int main(int argc, char * argv[])
|
||||
CConsoleHandler console(callbackFunction);
|
||||
console.start();
|
||||
|
||||
CBasicLogConfigurator logConfig(logPath, &console);
|
||||
CBasicLogConfigurator logConfigurator(logPath, &console);
|
||||
#else
|
||||
CBasicLogConfigurator logConfig(logPath, nullptr);
|
||||
CBasicLogConfigurator logConfigurator(logPath, nullptr);
|
||||
#endif
|
||||
|
||||
logConfig.configureDefault();
|
||||
logConfigurator.configureDefault();
|
||||
logGlobal->info("Starting client of '%s'", GameConstants::VCMI_VERSION);
|
||||
logGlobal->info("Creating console and configuring logger: %d ms", pomtime.getDiff());
|
||||
logGlobal->info("The log file will be saved to %s", logPath);
|
||||
@@ -289,7 +290,7 @@ int main(int argc, char * argv[])
|
||||
setSettingInteger("general/saveFrequency", "savefrequency", 1);
|
||||
|
||||
// Initialize logging based on settings
|
||||
logConfig.configure();
|
||||
logConfigurator.configure();
|
||||
logGlobal->debug("settings = %s", settings.toJsonNode().toString());
|
||||
|
||||
// Some basic data validation to produce better error messages in cases of incorrect install
|
||||
|
||||
Reference in New Issue
Block a user