mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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
|
|
@ -39,6 +39,7 @@ class Field
|
|||
~Field();
|
||||
|
||||
enum DataTypes GetType() const { return mType; }
|
||||
bool IsNULL() const { return mValue == NULL; }
|
||||
|
||||
const char *GetString() const { return mValue; }
|
||||
std::string GetCppString() const
|
||||
|
|
|
|||
|
|
@ -193,29 +193,46 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ACE_Th
|
|||
#define sLog MaNGOS::Singleton<Log>::Instance()
|
||||
|
||||
#define BASIC_LOG(...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC)) \
|
||||
sLog.outBasic(__VA_ARGS__)
|
||||
sLog.outBasic(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define BASIC_FILTER_LOG(F,...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC) && (sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outBasic(__VA_ARGS__)
|
||||
sLog.outBasic(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define DETAIL_LOG(...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL)) \
|
||||
sLog.outDetail(__VA_ARGS__)
|
||||
sLog.outDetail(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define DETAIL_FILTER_LOG(F,...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL) && (sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outDetail(__VA_ARGS__)
|
||||
sLog.outDetail(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define DEBUG_LOG(...) \
|
||||
do { \
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) \
|
||||
sLog.outDebug(__VA_ARGS__)
|
||||
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__)
|
||||
sLog.outDebug(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define ERROR_DB_FILTER_LOG(F,...) \
|
||||
do { \
|
||||
if ((sLog.getLogFilter() & (F))==0) \
|
||||
sLog.outErrorDb(__VA_ARGS__)
|
||||
sLog.outErrorDb(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define ERROR_DB_STRICT_LOG(...) \
|
||||
ERROR_DB_FILTER_LOG(LOG_FILTER_DB_STRICTED_CHECK, __VA_ARGS__)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10024"
|
||||
#define REVISION_NR "10025"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue