From ca49316628e8e3e6161d9a9649893664ef36c925 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 31 Aug 2014 14:32:24 +0300 Subject: Improve packets logging speed. --- src/logger.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/logger.h') diff --git a/src/logger.h b/src/logger.h index e26d3e6e6..8eafc70af 100644 --- a/src/logger.h +++ b/src/logger.h @@ -41,18 +41,9 @@ #ifdef ENABLEDEBUGLOG #define DEBUGLOG2(msg, comment) \ if (logger) \ - { \ - if (comment) \ - { \ - logger->dlog(std::string(msg).append(": ").append(comment)); \ - } \ - else \ - { \ - logger->dlog(msg); \ - } \ - } + logger->dlog2(msg, comment) #else -#define DEBUGLOG(msg) {} +#define DEBUGLOG2(msg, comment) {} #endif /** @@ -127,6 +118,8 @@ class Logger final * Enters debug message in the log. The message will be timestamped. */ void dlog(const std::string &str); + + void dlog2(const std::string &str, const char* const comment); #endif void setDebugLog(const bool n) -- cgit v1.2.3-70-g09d2