diff --git a/common/debug.cpp b/common/debug.cpp index 08d8ee8e2..6c47705bd 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -58,28 +58,10 @@ static volatile bool logFileValid = false; static EQEmuLog realLogFile; EQEmuLog *LogFile = &realLogFile; -static const char* FileNames[EQEmuLog::MaxLogID] = { "logs/eqemu", "logs/eqemu", "logs/eqemu_error", "logs/eqemu_debug", "logs/eqemu_quest", "logs/eqemu_commands", "logs/crash" }; -static const char* LogNames[EQEmuLog::MaxLogID] = { "Status", "Normal", "Error", "Debug", "Quest", "Command", "Crash" }; - EQEmuLog::EQEmuLog() { - pLogStatus[EQEmuLog::LogIDs::Status] = LOG_LEVEL_STATUS; - pLogStatus[EQEmuLog::LogIDs::Normal] = LOG_LEVEL_NORMAL; - pLogStatus[EQEmuLog::LogIDs::Error] = LOG_LEVEL_ERROR; - pLogStatus[EQEmuLog::LogIDs::Debug] = LOG_LEVEL_DEBUG; - pLogStatus[EQEmuLog::LogIDs::Quest] = LOG_LEVEL_QUEST; - pLogStatus[EQEmuLog::LogIDs::Commands] = LOG_LEVEL_COMMANDS; - pLogStatus[EQEmuLog::LogIDs::Crash] = LOG_LEVEL_CRASH; - logFileValid = true; } EQEmuLog::~EQEmuLog() { - logFileValid = false; - for (int i = 0; i < MaxLogID; i++) { - LockMutex lock(&MLog[i]); //to prevent termination race - if (fp[i]) { - fclose(fp[i]); - } - } } \ No newline at end of file diff --git a/common/debug.h b/common/debug.h index 889903a88..50567e0e8 100644 --- a/common/debug.h +++ b/common/debug.h @@ -78,34 +78,7 @@ class EQEmuLog { public: EQEmuLog(); ~EQEmuLog(); - - enum LogIDs { - Status = 0, /* This must stay the first entry in this list */ - Normal, /* Normal Logs */ - Error, /* Error Logs */ - Debug, /* Debug Logs */ - Quest, /* Quest Logs */ - Commands, /* Issued Comamnds */ - Crash, /* Crash Logs */ - Save, /* Client Saves */ - MaxLogID /* Max, used in functions to get the max log ID */ - }; - - private: - - Mutex MOpen; - Mutex MLog[MaxLogID]; - FILE* fp[MaxLogID]; - -/* LogStatus: bitwise variable - 1 = output to file - 2 = output to stdout - 4 = fopen error, dont retry - 8 = use stderr instead (2 must be set) -*/ - uint8 pLogStatus[MaxLogID]; - }; extern EQEmuLog* LogFile;