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();
|
~Field();
|
||||||
|
|
||||||
enum DataTypes GetType() const { return mType; }
|
enum DataTypes GetType() const { return mType; }
|
||||||
|
bool IsNULL() const { return mValue == NULL; }
|
||||||
|
|
||||||
const char *GetString() const { return mValue; }
|
const char *GetString() const { return mValue; }
|
||||||
std::string GetCppString() const
|
std::string GetCppString() const
|
||||||
|
|
|
||||||
|
|
@ -192,30 +192,47 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ACE_Th
|
||||||
|
|
||||||
#define sLog MaNGOS::Singleton<Log>::Instance()
|
#define sLog MaNGOS::Singleton<Log>::Instance()
|
||||||
|
|
||||||
#define BASIC_LOG(...) \
|
#define BASIC_LOG(...) \
|
||||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC)) \
|
do { \
|
||||||
sLog.outBasic(__VA_ARGS__)
|
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC)) \
|
||||||
#define BASIC_FILTER_LOG(F,...) \
|
sLog.outBasic(__VA_ARGS__); \
|
||||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC) && (sLog.getLogFilter() & (F))==0) \
|
} while(0)
|
||||||
sLog.outBasic(__VA_ARGS__)
|
|
||||||
|
|
||||||
#define DETAIL_LOG(...) \
|
#define BASIC_FILTER_LOG(F,...) \
|
||||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL)) \
|
do { \
|
||||||
sLog.outDetail(__VA_ARGS__)
|
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC) && (sLog.getLogFilter() & (F))==0) \
|
||||||
#define DETAIL_FILTER_LOG(F,...) \
|
sLog.outBasic(__VA_ARGS__); \
|
||||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL) && (sLog.getLogFilter() & (F))==0) \
|
} while(0)
|
||||||
sLog.outDetail(__VA_ARGS__)
|
|
||||||
|
|
||||||
#define DEBUG_LOG(...) \
|
#define DETAIL_LOG(...) \
|
||||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) \
|
do { \
|
||||||
sLog.outDebug(__VA_ARGS__)
|
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL)) \
|
||||||
#define DEBUG_FILTER_LOG(F,...) \
|
sLog.outDetail(__VA_ARGS__); \
|
||||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG) && (sLog.getLogFilter() & (F))==0) \
|
} while(0)
|
||||||
sLog.outDebug(__VA_ARGS__)
|
|
||||||
|
|
||||||
#define ERROR_DB_FILTER_LOG(F,...) \
|
#define DETAIL_FILTER_LOG(F,...) \
|
||||||
if ((sLog.getLogFilter() & (F))==0) \
|
do { \
|
||||||
sLog.outErrorDb(__VA_ARGS__)
|
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(...) \
|
#define ERROR_DB_STRICT_LOG(...) \
|
||||||
ERROR_DB_FILTER_LOG(LOG_FILTER_DB_STRICTED_CHECK, __VA_ARGS__)
|
ERROR_DB_FILTER_LOG(LOG_FILTER_DB_STRICTED_CHECK, __VA_ARGS__)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10024"
|
#define REVISION_NR "10025"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue