From: Pieter Lexis Date: Fri, 22 May 2015 15:00:53 +0000 (+0200) Subject: Shrink Logger from 32 to 24 bytes X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~77^2~4^2~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0eb8971adfefc1e6c3a064b36caeed950e5454a;p=thirdparty%2Fpdns.git Shrink Logger from 32 to 24 bytes Make Urgency 2 bytes instead of 4. --- diff --git a/pdns/logger.hh b/pdns/logger.hh index f74f4a1acf..27c565f65b 100644 --- a/pdns/logger.hh +++ b/pdns/logger.hh @@ -39,7 +39,7 @@ public: Logger(const string &, int facility=LOG_DAEMON); //!< pass the identification you wish to appear in the log //! The urgency of a log message - enum Urgency {All=99999,NTLog=12345,Alert=LOG_ALERT, Critical=LOG_CRIT, Error=LOG_ERR, Warning=LOG_WARNING, + enum Urgency : int16_t {All=32767,NTLog=12345,Alert=LOG_ALERT, Critical=LOG_CRIT, Error=LOG_ERR, Warning=LOG_WARNING, Notice=LOG_NOTICE,Info=LOG_INFO, Debug=LOG_DEBUG, None=-1}; /** Log a message. @@ -92,12 +92,13 @@ private: static void perThreadDestructor(void *); PerThread* getPerThread(); void open(); + string name; int flags; int d_facility; - bool opened; Urgency d_loglevel; Urgency consoleUrgency; + bool opened; static pthread_once_t s_once; static pthread_key_t s_loggerKey; };