Preliminary addition of log settings map

This commit is contained in:
Akkadius 2015-01-12 02:16:57 -06:00
parent 3c53d907da
commit 489f24a80a
2 changed files with 26 additions and 13 deletions

View File

@ -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;
}

View File

@ -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;