From 9cfac2e0c3ddbd6751329dfffeecf6e87e1869ef Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 18 May 2016 12:28:41 +0200 Subject: [PATCH] Ensure the `logmessages` statistic is increased. When a message is sent to the console or syslog, increase the logmessages counter. Closes #3855 --- pdns/logger.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pdns/logger.cc b/pdns/logger.cc index 35e3efd113..4d1d3708b9 100644 --- a/pdns/logger.cc +++ b/pdns/logger.cc @@ -44,6 +44,7 @@ Logger &theL(const string &pname) void Logger::log(const string &msg, Urgency u) { + bool mustAccount(false); struct tm tm; time_t t; time(&t); @@ -55,13 +56,17 @@ void Logger::log(const string &msg, Urgency u) static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; Lock l(&m); // the C++-2011 spec says we need this, and OSX actually does clog << string(buffer) + msg <