From 489f24a80ac20c916432b73fc50cd993234ef075 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 12 Jan 2015 02:16:57 -0600 Subject: [PATCH] Preliminary addition of log settings map --- common/eqemu_logsys.cpp | 24 +++++++++++------------- common/eqemu_logsys.h | 15 +++++++++++++++ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index c7e8d300f..632eed4da 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -69,19 +69,12 @@ static const char* TypeNames[EQEmuLogSys::MaxLogID] = { "Command", "Crash", "Save", - /* - "UCS", - "Query Server", - "Socket Server", - "Spawns", - "AI", - "Pathing", - "Quests", - "Spells", - "Zone", - "Tasks", - "Trading", - */ +}; + +static const char* LogCategoryName[EQEmuLogSys::LogCategory::MaxCategoryID] = { + "Netcode", + "Guilds", + "Rules", }; static Console::Color LogColors[EQEmuLogSys::MaxLogID] = { @@ -96,6 +89,11 @@ static Console::Color LogColors[EQEmuLogSys::MaxLogID] = { EQEmuLogSys::EQEmuLogSys(){ + // LogSettings log_settings; + for (int i = 0; i < EQEmuLogSys::LogCategory::MaxCategoryID; i++){ + log_settings[i].log_to_console = 1; + std::cout << "Setting log settings for " << i << " " << LogCategoryName[i] << " " << std::endl; + } std::cout << "I AM CONSTRUCTING!!!! LUL " << std::endl; } diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index 746689920..2e0b8c0a4 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -46,6 +46,13 @@ public: Detail, /* 2 - Use this for extreme detail in logging, usually in extreme debugging in the stack or interprocess communication */ }; + enum LogCategory { + Netcode = 0, + Guilds, + Rules, + MaxCategoryID /* Don't Remove this*/ + }; + void CloseZoneLogs(); void ConsoleMessage(uint16 log_type, const std::string message); void Log(uint16 log_type, const std::string message, ...); @@ -55,6 +62,14 @@ public: void SetCurrentTimeStamp(char* time_stamp); void StartZoneLogs(const std::string log_name); + struct LogSettings{ + uint8 log_to_file; + uint8 log_to_console; + uint8 log_to_gmsay; + }; + + LogSettings log_settings[EQEmuLogSys::LogCategory::MaxCategoryID]; + private: bool zone_general_init = false;