Load log settings from the database

This commit is contained in:
Akkadius
2019-07-05 03:50:01 -05:00
parent feea52f79e
commit ffd652a643
5 changed files with 117 additions and 32 deletions
+2 -11
View File
@@ -48,17 +48,6 @@ int main()
LogSys.LoadLogSettingsDefaults();
LogSys.log_settings[Logs::Error].log_to_console = Logs::General;
LogSys.log_settings[Logs::Error].is_category_enabled = 1;
LogSys.log_settings[Logs::MySQLError].log_to_console = Logs::General;
LogSys.log_settings[Logs::MySQLError].is_category_enabled = 1;
LogSys.log_settings[Logs::MySQLQuery].log_to_console = Logs::General;
LogSys.log_settings[Logs::MySQLQuery].is_category_enabled = 1;
LogSys.log_settings[Logs::Netcode].log_to_console = Logs::General;
LogSys.log_settings[Logs::Netcode].is_category_enabled = Logs::General;
LogSys.log_settings[Logs::Login_Server].log_to_console = Logs::Detail;
LogLoginserver("Logging System Init");
server.config = EQ::JsonConfigFile::Load("login.json");
@@ -141,6 +130,8 @@ int main()
server.config.GetVariableString("database", "db", "peq")
);
server.db->LoadLogSettings(LogSys.log_settings);
/**
* make sure our database got created okay, otherwise cleanup and exit
*/