diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-31 13:53:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-31 13:53:06 +0300 |
commit | a63248380554067d4291c653b4ba82db36fbc821 (patch) | |
tree | c4ad257d15fc44179ccafe9c3e887bfce710967c /src/logger.h | |
parent | 1d5aa3c38c3a545ad0056613f561ac01d945b2ed (diff) | |
download | manaplus-a63248380554067d4291c653b4ba82db36fbc821.tar.gz manaplus-a63248380554067d4291c653b4ba82db36fbc821.tar.bz2 manaplus-a63248380554067d4291c653b4ba82db36fbc821.tar.xz manaplus-a63248380554067d4291c653b4ba82db36fbc821.zip |
Add comments for inbound packet fields in debug log.
Diffstat (limited to 'src/logger.h')
-rw-r--r-- | src/logger.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/logger.h b/src/logger.h index 66e5d0ea7..e26d3e6e6 100644 --- a/src/logger.h +++ b/src/logger.h @@ -38,6 +38,23 @@ #define DEBUGLOG(msg) {} #endif +#ifdef ENABLEDEBUGLOG +#define DEBUGLOG2(msg, comment) \ + if (logger) \ + { \ + if (comment) \ + { \ + logger->dlog(std::string(msg).append(": ").append(comment)); \ + } \ + else \ + { \ + logger->dlog(msg); \ + } \ + } +#else +#define DEBUGLOG(msg) {} +#endif + /** * The Log Class : Useful to write debug or info messages */ |