diff options
author | Machiavelli <machiavelli.trinity@gmail.com> | 2011-02-20 20:16:34 +0100 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2011-02-20 20:16:34 +0100 |
commit | e07e20ffcaf6911d4dd47e0895fbdc52c5a52f05 (patch) | |
tree | fcc0c8865a387c67b925df174e22f49820a985a0 /src/server/shared/Logging/Log.cpp | |
parent | 45db1591a4959ca9d58fc40ea2294936bcf4bd10 (diff) |
Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf.
Diffstat (limited to 'src/server/shared/Logging/Log.cpp')
-rwxr-xr-x | src/server/shared/Logging/Log.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index dd66e3e0811..eaff7cbd8fa 100755 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -168,16 +168,7 @@ void Log::Initialize() m_dbLogLevel = sConfig->GetIntDefault("DBLogLevel", LOGL_NORMAL); m_sqlDriverQueryLogging = sConfig->GetBoolDefault("SQLDriverQueryLogging", false); - m_logFilter = 0; - - if(sConfig->GetBoolDefault("LogFilter_TransportMoves", true)) - m_logFilter |= LOG_FILTER_TRANSPORT_MOVES; - if(sConfig->GetBoolDefault("LogFilter_CreatureMoves", true)) - m_logFilter |= LOG_FILTER_CREATURE_MOVES; - if(sConfig->GetBoolDefault("LogFilter_VisibilityChanges", true)) - m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES; - if(sConfig->GetBoolDefault("LogFilter_AchievementUpdates", true)) - m_logFilter |= LOG_FILTER_ACHIEVEMENT_UPDATES; + m_DebugLogMask = DebugLogFilters(sConfig->GetIntDefault("DebugLogMask", LOG_FILTER_NONE)); // Char log settings m_charLog_Dump = sConfig->GetBoolDefault("CharLogDump", false); @@ -723,8 +714,11 @@ void Log::outDebugInLine(const char * str, ...) } } -void Log::outDebug(const char * str, ...) +void Log::outDebug(DebugLogFilters f, const char * str, ...) { + if (!(m_DebugLogMask & f)) + return; + if (!str) return; |