Merge pull request #150 from OogwayUniverse/script_ignore

This commit is contained in:
Mick
2021-12-13 15:44:35 +01:00
committed by GitHub
11 changed files with 72 additions and 74 deletions

View File

@@ -48,6 +48,7 @@ int main(int argc, char** argv) {
dConfig config("chatconfig.ini");
Game::config = &config;
Game::logger->SetLogToConsole(bool(std::stoi(config.GetValue("log_to_console"))));
Game::logger->SetLogDebugStatements(bool(std::stoi(config.GetValue("log_debug_statements"))));
//Connect to the MySQL Database
std::string mysql_host = config.GetValue("mysql_host");
@@ -156,14 +157,16 @@ int main(int argc, char** argv) {
return 0;
}
dLogger* SetupLogger() {
dLogger * SetupLogger() {
std::string logPath = "./logs/ChatServer_" + 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) {