From fac1361d36df1f5a8c15ef0847d22f388b59bc2e Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 12 Jan 2015 05:15:31 -0600 Subject: [PATCH] logger.LoadLogSettings() added after each platform executable registry Added int return for platform executable --- client_files/export/main.cpp | 1 + client_files/import/main.cpp | 1 + common/platform.cpp | 3 +++ common/platform.h | 1 + eqlaunch/eqlaunch.cpp | 1 + queryserv/queryserv.cpp | 1 + shared_memory/main.cpp | 1 + ucs/ucs.cpp | 1 + world/net.cpp | 3 +++ zone/net.cpp | 3 ++- 10 files changed, 15 insertions(+), 1 deletion(-) diff --git a/client_files/export/main.cpp b/client_files/export/main.cpp index d76ae12cd..550446cb2 100644 --- a/client_files/export/main.cpp +++ b/client_files/export/main.cpp @@ -35,6 +35,7 @@ void ExportBaseData(SharedDatabase *db); int main(int argc, char **argv) { RegisterExecutablePlatform(ExePlatformClientExport); + logger.LoadLogSettings(); set_exception_handler(); logger.Log(EQEmuLogSys::Status, "Client Files Export Utility"); diff --git a/client_files/import/main.cpp b/client_files/import/main.cpp index 7e1eb7557..381889d93 100644 --- a/client_files/import/main.cpp +++ b/client_files/import/main.cpp @@ -33,6 +33,7 @@ void ImportBaseData(SharedDatabase *db); int main(int argc, char **argv) { RegisterExecutablePlatform(ExePlatformClientImport); + logger.LoadLogSettings(); set_exception_handler(); logger.Log(EQEmuLogSys::Status, "Client Files Import Utility"); diff --git a/common/platform.cpp b/common/platform.cpp index 1a7b2ed7f..4955d6639 100644 --- a/common/platform.cpp +++ b/common/platform.cpp @@ -10,3 +10,6 @@ const EQEmuExePlatform& GetExecutablePlatform() { return exe_platform; } +int GetExecutablePlatformInt(){ + return exe_platform; +} \ No newline at end of file diff --git a/common/platform.h b/common/platform.h index 7eaae045b..281402291 100644 --- a/common/platform.h +++ b/common/platform.h @@ -18,5 +18,6 @@ enum EQEmuExePlatform void RegisterExecutablePlatform(EQEmuExePlatform p); const EQEmuExePlatform& GetExecutablePlatform(); +int GetExecutablePlatformInt(); #endif diff --git a/eqlaunch/eqlaunch.cpp b/eqlaunch/eqlaunch.cpp index 5ddcfefdd..89e2b0670 100644 --- a/eqlaunch/eqlaunch.cpp +++ b/eqlaunch/eqlaunch.cpp @@ -39,6 +39,7 @@ void CatchSignal(int sig_num); int main(int argc, char *argv[]) { RegisterExecutablePlatform(ExePlatformLaunch); + logger.LoadLogSettings(); set_exception_handler(); std::string launcher_name; diff --git a/queryserv/queryserv.cpp b/queryserv/queryserv.cpp index ce64b646b..fa52a11f5 100644 --- a/queryserv/queryserv.cpp +++ b/queryserv/queryserv.cpp @@ -50,6 +50,7 @@ void CatchSignal(int sig_num) { int main() { RegisterExecutablePlatform(ExePlatformQueryServ); + logger.LoadLogSettings(); set_exception_handler(); Timer LFGuildExpireTimer(60000); Timer InterserverTimer(INTERSERVER_TIMER); // does auto-reconnect diff --git a/shared_memory/main.cpp b/shared_memory/main.cpp index c7d9f2e42..333d5789c 100644 --- a/shared_memory/main.cpp +++ b/shared_memory/main.cpp @@ -37,6 +37,7 @@ EQEmuLogSys logger; int main(int argc, char **argv) { RegisterExecutablePlatform(ExePlatformSharedMemory); + logger.LoadLogSettings(); set_exception_handler(); logger.Log(EQEmuLogSys::Status, "Shared Memory Loader Program"); diff --git a/ucs/ucs.cpp b/ucs/ucs.cpp index ad3af0379..2024bf155 100644 --- a/ucs/ucs.cpp +++ b/ucs/ucs.cpp @@ -69,6 +69,7 @@ std::string GetMailPrefix() { int main() { RegisterExecutablePlatform(ExePlatformUCS); + logger.LoadLogSettings(); set_exception_handler(); // Check every minute for unused channels we can delete diff --git a/world/net.cpp b/world/net.cpp index c75dbe04b..3977f482b 100644 --- a/world/net.cpp +++ b/world/net.cpp @@ -105,12 +105,15 @@ uint32 numclients = 0; uint32 numzones = 0; bool holdzones = false; +EQEmuLogSys logger; + extern ConsoleList console_list; void CatchSignal(int sig_num); int main(int argc, char** argv) { RegisterExecutablePlatform(ExePlatformWorld); + logger.LoadLogSettings(); set_exception_handler(); /* Database Version Check */ diff --git a/zone/net.cpp b/zone/net.cpp index 2ab8a0e2e..95b7f1396 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -17,6 +17,7 @@ */ #define DONT_SHARED_OPCODES +#define PLATFORM_ZONE 1 #include "../common/debug.h" #include "../common/features.h" @@ -42,7 +43,6 @@ #include "../common/memory_mapped_file.h" #include "../common/eqemu_exception.h" #include "../common/spdat.h" - #include "../common/eqemu_logsys.h" #include "zone_config.h" @@ -114,6 +114,7 @@ extern void MapOpcodes(); int main(int argc, char** argv) { RegisterExecutablePlatform(ExePlatformZone); + logger.LoadLogSettings(); set_exception_handler(); const char *zone_name;