Adjust defaults for LoadLogSettingsDefault

This commit is contained in:
Akkadius 2015-01-20 04:56:13 -06:00
parent d5018029a4
commit 0110755c47
2 changed files with 18 additions and 12 deletions

View File

@ -89,6 +89,12 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
log_settings[i].log_to_file = 0; log_settings[i].log_to_file = 0;
log_settings[i].log_to_gmsay = 0; log_settings[i].log_to_gmsay = 0;
} }
log_settings[Logs::World_Server].log_to_console = 1;
log_settings[Logs::Zone_Server].log_to_console = 1;
log_settings[Logs::QS_Server].log_to_console = 1;
log_settings[Logs::UCS_Server].log_to_console = 1;
log_settings_loaded = true; log_settings_loaded = true;
} }

View File

@ -78,11 +78,11 @@ int main() {
Timer InterserverTimer(INTERSERVER_TIMER); // does auto-reconnect Timer InterserverTimer(INTERSERVER_TIMER); // does auto-reconnect
Log.Out(Logs::Detail, Logs::UCS_Server, "Starting EQEmu Universal Chat Server."); Log.Out(Logs::General, Logs::UCS_Server, "Starting EQEmu Universal Chat Server.");
if (!ucsconfig::LoadConfig()) { if (!ucsconfig::LoadConfig()) {
Log.Out(Logs::Detail, Logs::UCS_Server, "Loading server configuration failed."); Log.Out(Logs::General, Logs::UCS_Server, "Loading server configuration failed.");
return 1; return 1;
} }
@ -91,7 +91,7 @@ int main() {
WorldShortName = Config->ShortName; WorldShortName = Config->ShortName;
Log.Out(Logs::Detail, Logs::UCS_Server, "Connecting to MySQL..."); Log.Out(Logs::General, Logs::UCS_Server, "Connecting to MySQL...");
if (!database.Connect( if (!database.Connect(
Config->DatabaseHost.c_str(), Config->DatabaseHost.c_str(),
@ -99,22 +99,22 @@ int main() {
Config->DatabasePassword.c_str(), Config->DatabasePassword.c_str(),
Config->DatabaseDB.c_str(), Config->DatabaseDB.c_str(),
Config->DatabasePort)) { Config->DatabasePort)) {
Log.Out(Logs::Detail, Logs::World_Server, "Cannot continue without a database connection."); Log.Out(Logs::General, Logs::World_Server, "Cannot continue without a database connection.");
return 1; return 1;
} }
char tmp[64]; char tmp[64];
if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) { if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) {
Log.Out(Logs::Detail, Logs::World_Server, "Loading rule set '%s'", tmp); Log.Out(Logs::General, Logs::World_Server, "Loading rule set '%s'", tmp);
if(!RuleManager::Instance()->LoadRules(&database, tmp)) { if(!RuleManager::Instance()->LoadRules(&database, tmp)) {
Log.Out(Logs::Detail, Logs::UCS_Server, "Failed to load ruleset '%s', falling back to defaults.", tmp); Log.Out(Logs::General, Logs::UCS_Server, "Failed to load ruleset '%s', falling back to defaults.", tmp);
} }
} else { } else {
if(!RuleManager::Instance()->LoadRules(&database, "default")) { if(!RuleManager::Instance()->LoadRules(&database, "default")) {
Log.Out(Logs::Detail, Logs::UCS_Server, "No rule set configured, using default rules"); Log.Out(Logs::General, Logs::UCS_Server, "No rule set configured, using default rules");
} else { } else {
Log.Out(Logs::Detail, Logs::UCS_Server, "Loaded default rule set 'default'", tmp); Log.Out(Logs::General, Logs::UCS_Server, "Loaded default rule set 'default'", tmp);
} }
} }
@ -122,7 +122,7 @@ int main() {
if(Config->ChatPort != Config->MailPort) if(Config->ChatPort != Config->MailPort)
{ {
Log.Out(Logs::Detail, Logs::UCS_Server, "MailPort and CharPort must be the same in eqemu_config.xml for UCS."); Log.Out(Logs::General, Logs::UCS_Server, "MailPort and CharPort must be the same in eqemu_config.xml for UCS.");
exit(1); exit(1);
} }
@ -133,11 +133,11 @@ int main() {
database.LoadChatChannels(); database.LoadChatChannels();
if (signal(SIGINT, CatchSignal) == SIG_ERR) { if (signal(SIGINT, CatchSignal) == SIG_ERR) {
Log.Out(Logs::Detail, Logs::UCS_Server, "Could not set signal handler"); Log.Out(Logs::General, Logs::UCS_Server, "Could not set signal handler");
return 1; return 1;
} }
if (signal(SIGTERM, CatchSignal) == SIG_ERR) { if (signal(SIGTERM, CatchSignal) == SIG_ERR) {
Log.Out(Logs::Detail, Logs::UCS_Server, "Could not set signal handler"); Log.Out(Logs::General, Logs::UCS_Server, "Could not set signal handler");
return 1; return 1;
} }