mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Code] EQEmuLogSys Global to Singleton Cleanup (#4925)
* [Code] EQEmuLogSys Global to Singleton Cleanup * Post merge fix
This commit is contained in:
+8
-9
@@ -102,7 +102,6 @@ TitleManager title_manager;
|
||||
QueryServ *QServ = 0;
|
||||
NpcScaleManager *npc_scale_manager;
|
||||
QuestParserCollection *parse = 0;
|
||||
EQEmuLogSys LogSys;
|
||||
ZoneEventScheduler event_scheduler;
|
||||
WorldContentService content_service;
|
||||
PlayerEventLogs player_event_logs;
|
||||
@@ -123,13 +122,13 @@ bool CheckForCompatibleQuestPlugins();
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
RegisterExecutablePlatform(ExePlatformZone);
|
||||
LogSys.LoadLogSettingsDefaults();
|
||||
EQEmuLogSys::Instance()->LoadLogSettingsDefaults();
|
||||
|
||||
set_exception_handler();
|
||||
|
||||
// silence logging if we ran a command
|
||||
if (ZoneCLI::RanConsoleCommand(argc, argv) || ZoneCLI::RanTestCommand(argc, argv)) {
|
||||
LogSys.SilenceConsoleLogging();
|
||||
EQEmuLogSys::Instance()->SilenceConsoleLogging();
|
||||
}
|
||||
|
||||
PathManager::Instance()->Init();
|
||||
@@ -295,18 +294,18 @@ int main(int argc, char **argv)
|
||||
|
||||
// command handler (no sidecar or test commands)
|
||||
if (ZoneCLI::RanConsoleCommand(argc, argv) && !(ZoneCLI::RanSidecarCommand(argc, argv) || ZoneCLI::RanTestCommand(argc, argv))) {
|
||||
LogSys.EnableConsoleLogging();
|
||||
EQEmuLogSys::Instance()->EnableConsoleLogging();
|
||||
ZoneCLI::CommandHandler(argc, argv);
|
||||
}
|
||||
|
||||
LogSys.SetDatabase(&database)
|
||||
EQEmuLogSys::Instance()->SetDatabase(&database)
|
||||
->SetLogPath(PathManager::Instance()->GetLogPath())
|
||||
->LoadLogDatabaseSettings(ZoneCLI::RanTestCommand(argc, argv))
|
||||
->SetGMSayHandler(&Zone::GMSayHookCallBackProcess)
|
||||
->StartFileLogs();
|
||||
|
||||
if (ZoneCLI::RanTestCommand(argc, argv)) {
|
||||
LogSys.SilenceConsoleLogging();
|
||||
EQEmuLogSys::Instance()->SilenceConsoleLogging();
|
||||
}
|
||||
|
||||
player_event_logs.SetDatabase(&database)->Init();
|
||||
@@ -489,7 +488,7 @@ int main(int argc, char **argv)
|
||||
// sidecar command handler
|
||||
if (ZoneCLI::RanConsoleCommand(argc, argv)
|
||||
&& (ZoneCLI::RanSidecarCommand(argc, argv) || ZoneCLI::RanTestCommand(argc, argv))) {
|
||||
LogSys.EnableConsoleLogging();
|
||||
EQEmuLogSys::Instance()->EnableConsoleLogging();
|
||||
ZoneCLI::CommandHandler(argc, argv);
|
||||
}
|
||||
|
||||
@@ -681,7 +680,7 @@ int main(int argc, char **argv)
|
||||
bot_command_deinit();
|
||||
safe_delete(parse);
|
||||
LogInfo("Proper zone shutdown complete.");
|
||||
LogSys.CloseFileLogs();
|
||||
EQEmuLogSys::Instance()->CloseFileLogs();
|
||||
|
||||
safe_delete(mutex);
|
||||
safe_delete(QServ);
|
||||
@@ -693,7 +692,7 @@ void Shutdown()
|
||||
{
|
||||
zone->Shutdown(true);
|
||||
LogInfo("Shutting down...");
|
||||
LogSys.CloseFileLogs();
|
||||
EQEmuLogSys::Instance()->CloseFileLogs();
|
||||
EQ::EventLoop::Get().Shutdown();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user