diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 16:34:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 16:58:46 +0300 |
commit | 38659dbd75d81edbe336d5311a1cd1184d359b7e (patch) | |
tree | 919c97a5e48c5e9287250eab34cb36ef5f02c21e /src/logger.h | |
parent | c1ba61eb566a0a1a2532690ba3bf7e6498bee06b (diff) | |
download | plus-38659dbd75d81edbe336d5311a1cd1184d359b7e.tar.gz plus-38659dbd75d81edbe336d5311a1cd1184d359b7e.tar.bz2 plus-38659dbd75d81edbe336d5311a1cd1184d359b7e.tar.xz plus-38659dbd75d81edbe336d5311a1cd1184d359b7e.zip |
add support for ignore packets logging.
Option for coma separated packet ids added in misc tab.
Diffstat (limited to 'src/logger.h')
-rw-r--r-- | src/logger.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/logger.h b/src/logger.h index d288d7c8d..9d2221543 100644 --- a/src/logger.h +++ b/src/logger.h @@ -33,17 +33,17 @@ #include "localconsts.h" #ifdef ENABLEDEBUGLOG -#define DEBUGLOG(msg) if (logger) logger->dlog(msg) +#define DEBUGLOG(str) \ + if (logger && !mIgnore) \ + logger->dlog(str) +#define DEBUGLOG2(str, pos, comment) \ + if (logger && !mIgnore) \ + logger->dlog2(str, pos, comment) +#define IGNOREDEBUGLOG mIgnore = Net::isIgnorePacket(mId) #else -#define DEBUGLOG(msg) {} -#endif - -#ifdef ENABLEDEBUGLOG -#define DEBUGLOG2(msg, pos, comment) \ - if (logger) \ - logger->dlog2(msg, pos, comment) -#else -#define DEBUGLOG2(msg, comment) {} +#define DEBUGLOG(str) {} +#define DEBUGLOG2(str, comment) {} +#define IGNOREDEBUGLOG {} #endif /** |