added log level control

This commit is contained in:
2014-11-18 10:51:52 +01:00
parent a2fdcce711
commit 2eaefaba3a
3 changed files with 15 additions and 10 deletions

View File

@ -6,6 +6,19 @@
#include <stdio.h>
#include <unistd.h>
#ifdef VERBOSE
#define FILELOG_MAX_LEVEL logDEBUG
#endif
#ifdef VERYVERBOSE
#define FILELOG_MAX_LEVEL logDEBUG4
#endif
#ifndef FILELOG_MAX_LEVEL
#define FILELOG_MAX_LEVEL logINFO
#endif
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#define MYCONCAT(x,y)
@ -60,10 +73,6 @@ public:
class FILELOG_DECLSPEC FILELog : public Log<Output2FILE> {};
//typedef Log<Output2FILE> FILELog;
#ifndef FILELOG_MAX_LEVEL
#define FILELOG_MAX_LEVEL logDEBUG4
#endif
#define FILE_LOG(level) \
if (level > FILELOG_MAX_LEVEL) ; \
else if (level > FILELog::ReportingLevel() || !Output2FILE::Stream()) ; \