Merge branch 'DarkflameUniverse:main' into main

This commit is contained in:
Nils Bergmann
2021-12-14 20:05:31 +01:00
committed by GitHub
34 changed files with 445 additions and 160 deletions

View File

@@ -72,6 +72,7 @@ int main(int argc, char** argv) {
dConfig config("masterconfig.ini");
Game::config = &config;
Game::logger->SetLogToConsole(bool(std::stoi(config.GetValue("log_to_console"))));
Game::logger->SetLogDebugStatements(config.GetValue("log_debug_statements") == "1");
//Connect to CDClient
try {
@@ -326,11 +327,13 @@ dLogger* SetupLogger() {
std::string logPath =
"./logs/MasterServer_" + std::to_string(time(nullptr)) + ".log";
bool logToConsole = false;
bool logDebugStatements = false;
#ifdef _DEBUG
logToConsole = true;
logDebugStatements = true;
#endif
return new dLogger(logPath, logToConsole);
return new dLogger(logPath, logToConsole, logDebugStatements);
}
void HandlePacket(Packet* packet) {