summaryrefslogtreecommitdiff
path: root/src/logger.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-31 13:53:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-31 13:53:06 +0300
commita63248380554067d4291c653b4ba82db36fbc821 (patch)
treec4ad257d15fc44179ccafe9c3e887bfce710967c /src/logger.h
parent1d5aa3c38c3a545ad0056613f561ac01d945b2ed (diff)
downloadmv-a63248380554067d4291c653b4ba82db36fbc821.tar.gz
mv-a63248380554067d4291c653b4ba82db36fbc821.tar.bz2
mv-a63248380554067d4291c653b4ba82db36fbc821.tar.xz
mv-a63248380554067d4291c653b4ba82db36fbc821.zip
Add comments for inbound packet fields in debug log.
Diffstat (limited to 'src/logger.h')
-rw-r--r--src/logger.h17
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
*/