From f81a8b716b532597272d8ee7a26f00e53ba8b6cb Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 18 Jan 2015 02:52:32 -0600 Subject: [PATCH] Rip out load_log_settings in all projects --- client_files/export/main.cpp | 3 --- client_files/import/main.cpp | 3 --- common/logsys.cpp | 13 +++++++++---- common/logsys.h | 4 +--- queryserv/queryserv.cpp | 6 ------ shared_memory/main.cpp | 3 --- ucs/ucs.cpp | 5 ----- world/net.cpp | 6 ------ zone/net.cpp | 9 --------- 9 files changed, 10 insertions(+), 42 deletions(-) diff --git a/client_files/export/main.cpp b/client_files/export/main.cpp index 5152cf008..45dd34cec 100644 --- a/client_files/export/main.cpp +++ b/client_files/export/main.cpp @@ -45,9 +45,6 @@ int main(int argc, char **argv) { } const EQEmuConfig *config = EQEmuConfig::get(); - if(!load_log_settings(config->LogSettingsFile.c_str())) { - Log.Out(Logs::General, Logs::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str()); - } SharedDatabase database; Log.Out(Logs::General, Logs::Status, "Connecting to database..."); diff --git a/client_files/import/main.cpp b/client_files/import/main.cpp index f390d2b0b..8567723ce 100644 --- a/client_files/import/main.cpp +++ b/client_files/import/main.cpp @@ -43,9 +43,6 @@ int main(int argc, char **argv) { } const EQEmuConfig *config = EQEmuConfig::get(); - if(!load_log_settings(config->LogSettingsFile.c_str())) { - Log.Out(Logs::General, Logs::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str()); - } SharedDatabase database; Log.Out(Logs::General, Logs::Status, "Connecting to database..."); diff --git a/common/logsys.cpp b/common/logsys.cpp index c01baf04e..f1fa6ed53 100644 --- a/common/logsys.cpp +++ b/common/logsys.cpp @@ -16,6 +16,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* + #include "debug.h" #include "eq_packet.h" #include "logsys.h" @@ -37,8 +39,9 @@ const char *log_category_names[NUMBER_OF_LOG_CATEGORIES] = { static LogTypeStatus real_log_type_info[NUMBER_OF_LOG_TYPES+1] = { #include "logtypes.h" - { false, NUMBER_OF_LOG_CATEGORIES, "BAD TYPE" } /* dummy trailing record */ + { false, NUMBER_OF_LOG_CATEGORIES, "BAD TYPE" } /* dummy trailing record }; + const LogTypeStatus *log_type_info = real_log_type_info; @@ -50,7 +53,7 @@ void log_hex(LogType type, const void *data, unsigned long length, unsigned char uint32 offset; for(offset=0;offsetbuild_header_dump(buffer); - log_message(type,"%s", buffer); + //log_message(type,"%s", buffer); log_hex(type,(const char *)p->pBuffer,p->size); } @@ -68,7 +71,7 @@ void log_raw_packet(LogType type, uint16 seq, const BasePacket *p) { return; char buffer[196]; p->build_raw_header_dump(buffer, seq); - log_message(type,buffer); + //log_message(type,buffer); log_hex(type,(const char *)p->pBuffer,p->size); } @@ -156,3 +159,5 @@ bool load_log_settings(const char *filename) { return(true); } + +*/ \ No newline at end of file diff --git a/common/logsys.h b/common/logsys.h index d65ecb928..8c2d7bd9f 100644 --- a/common/logsys.h +++ b/common/logsys.h @@ -65,8 +65,6 @@ extern const LogTypeStatus *log_type_info; // For log_packet, et all. class BasePacket; -extern void log_message(LogType type, const char *fmt, ...); -extern void log_messageVA(LogType type, const char *fmt, va_list args); extern void log_hex(LogType type, const void *data, unsigned long length, unsigned char padding=4); extern void log_packet(LogType type, const BasePacket *p); extern void log_raw_packet(LogType type, uint16 seq, const BasePacket *p); @@ -116,7 +114,7 @@ extern void log_toggle(LogType t); #define is_log_enabled( type ) \ log_type_info[ type ].enabled -extern bool load_log_settings(const char *filename); +// extern bool load_log_settings(const char *filename); #endif /*LOGSYS_H_*/ diff --git a/queryserv/queryserv.cpp b/queryserv/queryserv.cpp index f5233c29e..b67d8ad4f 100644 --- a/queryserv/queryserv.cpp +++ b/queryserv/queryserv.cpp @@ -87,12 +87,6 @@ int main() { return 1; } - /* Initialize Logging */ - if (!load_log_settings(Config->LogSettingsFile.c_str())) - Log.Out(Logs::Detail, Logs::QS_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str()); - else - Log.Out(Logs::Detail, Logs::QS_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str()); - if (signal(SIGINT, CatchSignal) == SIG_ERR) { Log.Out(Logs::Detail, Logs::QS_Server, "Could not set signal handler"); return 1; diff --git a/shared_memory/main.cpp b/shared_memory/main.cpp index dc2817f9a..ddc42cbc3 100644 --- a/shared_memory/main.cpp +++ b/shared_memory/main.cpp @@ -47,9 +47,6 @@ int main(int argc, char **argv) { } const EQEmuConfig *config = EQEmuConfig::get(); - if(!load_log_settings(config->LogSettingsFile.c_str())) { - Log.Out(Logs::General, Logs::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str()); - } SharedDatabase database; Log.Out(Logs::General, Logs::Status, "Connecting to database..."); diff --git a/ucs/ucs.cpp b/ucs/ucs.cpp index 241d50775..1bbb66c16 100644 --- a/ucs/ucs.cpp +++ b/ucs/ucs.cpp @@ -89,11 +89,6 @@ int main() { Config = ucsconfig::get(); - if(!load_log_settings(Config->LogSettingsFile.c_str())) - Log.Out(Logs::Detail, Logs::UCS_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str()); - else - Log.Out(Logs::Detail, Logs::UCS_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str()); - WorldShortName = Config->ShortName; Log.Out(Logs::Detail, Logs::UCS_Server, "Connecting to MySQL..."); diff --git a/world/net.cpp b/world/net.cpp index bab38026b..8914415a4 100644 --- a/world/net.cpp +++ b/world/net.cpp @@ -133,12 +133,6 @@ int main(int argc, char** argv) { } const WorldConfig *Config=WorldConfig::get(); - if(!load_log_settings(Config->LogSettingsFile.c_str())) - Log.Out(Logs::Detail, Logs::World_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str()); - else - Log.Out(Logs::Detail, Logs::World_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str()); - - Log.Out(Logs::Detail, Logs::World_Server, "CURRENT_VERSION: %s", CURRENT_VERSION); #ifdef _DEBUG diff --git a/zone/net.cpp b/zone/net.cpp index 987124ea1..a299da25a 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -155,11 +155,6 @@ int main(int argc, char** argv) { } const ZoneConfig *Config=ZoneConfig::get(); - if(!load_log_settings(Config->LogSettingsFile.c_str())) - Log.Out(Logs::Detail, Logs::Zone_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str()); - else - Log.Out(Logs::Detail, Logs::Zone_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str()); - worldserver.SetPassword(Config->SharedKey.c_str()); Log.Out(Logs::Detail, Logs::Zone_Server, "Connecting to MySQL..."); @@ -207,10 +202,6 @@ int main(int argc, char** argv) { #endif const char *log_ini_file = "./log.ini"; - if(!load_log_settings(log_ini_file)) - Log.Out(Logs::Detail, Logs::Zone_Server, "Warning: Unable to read %s", log_ini_file); - else - Log.Out(Logs::Detail, Logs::Zone_Server, "Log settings loaded from %s", log_ini_file); Log.Out(Logs::Detail, Logs::Zone_Server, "Mapping Incoming Opcodes"); MapOpcodes();