mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 05:01:29 +00:00
Refactor ProcessGMSay to no longer use type
This commit is contained in:
parent
57ac6c0e98
commit
0926a5ded3
@ -61,25 +61,15 @@ namespace Console {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* TypeNames[EQEmuLogSys::MaxLogID] = {
|
// static Console::Color LogColors[MaxCategoryID] = {
|
||||||
"Status",
|
// Console::Color::Yellow, // "Status",
|
||||||
"Normal",
|
// Console::Color::Yellow, // "Normal",
|
||||||
"Error",
|
// Console::Color::LightRed, // "Error",
|
||||||
"Debug",
|
// Console::Color::LightGreen, // "Debug",
|
||||||
"Quest",
|
// Console::Color::LightCyan, // "Quest",
|
||||||
"Command",
|
// Console::Color::LightMagenta, // "Command",
|
||||||
"Crash",
|
// Console::Color::LightRed // "Crash"
|
||||||
};
|
// };
|
||||||
|
|
||||||
static Console::Color LogColors[EQEmuLogSys::MaxLogID] = {
|
|
||||||
Console::Color::Yellow, // "Status",
|
|
||||||
Console::Color::Yellow, // "Normal",
|
|
||||||
Console::Color::LightRed, // "Error",
|
|
||||||
Console::Color::LightGreen, // "Debug",
|
|
||||||
Console::Color::LightCyan, // "Quest",
|
|
||||||
Console::Color::LightMagenta, // "Command",
|
|
||||||
Console::Color::LightRed // "Crash"
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
EQEmuLogSys::EQEmuLogSys(){
|
EQEmuLogSys::EQEmuLogSys(){
|
||||||
@ -109,7 +99,7 @@ std::string EQEmuLogSys::FormatDebugCategoryMessageString(uint16 log_category, s
|
|||||||
return StringFormat("%s%s", category_string.c_str(), in_message.c_str());
|
return StringFormat("%s%s", category_string.c_str(), in_message.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmuLogSys::ProcessGMSay(uint16 log_type, uint16 log_category, std::string message)
|
void EQEmuLogSys::ProcessGMSay(uint16 log_category, std::string message)
|
||||||
{
|
{
|
||||||
/* Check if category enabled for process */
|
/* Check if category enabled for process */
|
||||||
if (log_settings[log_category].log_to_gmsay == 0)
|
if (log_settings[log_category].log_to_gmsay == 0)
|
||||||
@ -186,7 +176,7 @@ void EQEmuLogSys::DebugCategory(DebugLevel debug_level, uint16 log_category, std
|
|||||||
std::string output_debug_message = EQEmuLogSys::FormatDebugCategoryMessageString(log_category, output_message);
|
std::string output_debug_message = EQEmuLogSys::FormatDebugCategoryMessageString(log_category, output_message);
|
||||||
|
|
||||||
EQEmuLogSys::ProcessConsoleMessage(EQEmuLogSys::Debug, log_category, output_debug_message);
|
EQEmuLogSys::ProcessConsoleMessage(EQEmuLogSys::Debug, log_category, output_debug_message);
|
||||||
EQEmuLogSys::ProcessGMSay(EQEmuLogSys::Debug, log_category, output_debug_message);
|
EQEmuLogSys::ProcessGMSay(log_category, output_debug_message);
|
||||||
EQEmuLogSys::ProcessLogWrite(EQEmuLogSys::Debug, log_category, output_debug_message);
|
EQEmuLogSys::ProcessLogWrite(EQEmuLogSys::Debug, log_category, output_debug_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,6 @@ public:
|
|||||||
|
|
||||||
void CloseFileLogs();
|
void CloseFileLogs();
|
||||||
void LoadLogSettingsDefaults();
|
void LoadLogSettingsDefaults();
|
||||||
void Log(uint16 log_type, const std::string message, ...);
|
|
||||||
void DebugCategory(DebugLevel debug_level, uint16 log_category, std::string message, ...);
|
void DebugCategory(DebugLevel debug_level, uint16 log_category, std::string message, ...);
|
||||||
void MakeDirectory(std::string directory_name);
|
void MakeDirectory(std::string directory_name);
|
||||||
void SetCurrentTimeStamp(char* time_stamp);
|
void SetCurrentTimeStamp(char* time_stamp);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user