mirror of
https://github.com/mangosfour/server.git
synced 2025-12-23 07:37:01 +00:00
[9838] More log filters and macro uses.
* LogFilter_Weather * LogFilter_PeriodicAffects * LogFilter_PlayerMoves * LogFilter_SQLText * LogFilter_AIAndMovegens * LogFilter_PlayerStats
This commit is contained in:
parent
e83aa1ba9d
commit
722135b326
89 changed files with 996 additions and 997 deletions
|
|
@ -36,10 +36,16 @@ enum LogLevel
|
|||
// bitmask
|
||||
enum LogFilters
|
||||
{
|
||||
LOG_FILTER_TRANSPORT_MOVES = 0x01,
|
||||
LOG_FILTER_CREATURE_MOVES = 0x02,
|
||||
LOG_FILTER_VISIBILITY_CHANGES = 0x04,
|
||||
LOG_FILTER_ACHIEVEMENT_UPDATES= 0x08
|
||||
LOG_FILTER_TRANSPORT_MOVES = 0x0001, // any related to transport moves
|
||||
LOG_FILTER_CREATURE_MOVES = 0x0002, // creature move by cells
|
||||
LOG_FILTER_VISIBILITY_CHANGES = 0x0004, // update visibility for diff objects and players
|
||||
LOG_FILTER_ACHIEVEMENT_UPDATES= 0x0008, // achievement update broadcasts
|
||||
LOG_FILTER_WEATHER = 0x0010, // weather changes
|
||||
LOG_FILTER_PLAYER_STATS = 0x0020, // player save data
|
||||
LOG_FILTER_SQL_TEXT = 0x0040, // raw SQL text send to DB engine
|
||||
LOG_FILTER_PLAYER_MOVES = 0x0080, // player moves by grid/cell
|
||||
LOG_FILTER_PERIODIC_AFFECTS = 0x0100, // DoT/HoT apply trace
|
||||
LOG_FILTER_AI_AND_MOVEGENSS = 0x0200, // DoT/HoT apply trace
|
||||
};
|
||||
|
||||
enum Color
|
||||
|
|
@ -167,14 +173,26 @@ 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(...) \
|
||||
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 DETAIL_LOG(...) if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL)) sLog.outDebug(__VA_ARGS__)
|
||||
#define DETAIL_FILTER_LOG(F,...) if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL) && (sLog.getLogFilter() & (F))==0) sLog.outDetail(__VA_ARGS__)
|
||||
#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 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.outDetail(__VA_ARGS__)
|
||||
#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__)
|
||||
|
||||
// primary for script library
|
||||
void MANGOS_DLL_SPEC outstring_log(const char * str, ...) ATTR_PRINTF(1,2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue