mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 22:37:06 +00:00
[10025] Fixed unexpected C++ code parsing with *FILTER_LOG in 'if'
This commit is contained in:
parent
54f2f507cf
commit
e431ab55cc
3 changed files with 40 additions and 22 deletions
|
|
@ -192,30 +192,47 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ACE_Th
|
|||
|
||||
#define sLog MaNGOS::Singleton<Log>::Instance()
|
||||
|
||||
#define BASIC_LOG(...) \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC)) \
|
||||
sLog.outBasic(__VA_ARGS__)
|
||||
#define BASIC_FILTER_LOG(F,...) \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC) && (sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outBasic(__VA_ARGS__)
|
||||
#define BASIC_LOG(...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC)) \
|
||||
sLog.outBasic(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define DETAIL_LOG(...) \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL)) \
|
||||
sLog.outDetail(__VA_ARGS__)
|
||||
#define DETAIL_FILTER_LOG(F,...) \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL) && (sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outDetail(__VA_ARGS__)
|
||||
#define BASIC_FILTER_LOG(F,...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC) && (sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outBasic(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define DEBUG_LOG(...) \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) \
|
||||
sLog.outDebug(__VA_ARGS__)
|
||||
#define DEBUG_FILTER_LOG(F,...) \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG) && (sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outDebug(__VA_ARGS__)
|
||||
#define DETAIL_LOG(...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL)) \
|
||||
sLog.outDetail(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define ERROR_DB_FILTER_LOG(F,...) \
|
||||
if ((sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outErrorDb(__VA_ARGS__)
|
||||
#define DETAIL_FILTER_LOG(F,...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL) && (sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outDetail(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define DEBUG_LOG(...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) \
|
||||
sLog.outDebug(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define DEBUG_FILTER_LOG(F,...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG) && (sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outDebug(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define ERROR_DB_FILTER_LOG(F,...) \
|
||||
do { \
|
||||
if ((sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outErrorDb(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define ERROR_DB_STRICT_LOG(...) \
|
||||
ERROR_DB_FILTER_LOG(LOG_FILTER_DB_STRICTED_CHECK, __VA_ARGS__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue