2014-01-03 05:52:15 +00:00
|
|
|
#ifndef MD_LOGGER
|
|
|
|
#define MD_LOGGER
|
|
|
|
|
|
|
|
#include "log4cpp/Category.hh"
|
|
|
|
#include "log4cpp/Appender.hh"
|
|
|
|
#include "log4cpp/FileAppender.hh"
|
|
|
|
#include "log4cpp/Layout.hh"
|
|
|
|
#include "log4cpp/BasicLayout.hh"
|
|
|
|
#include "log4cpp/Priority.hh"
|
|
|
|
|
2014-01-18 20:35:18 +00:00
|
|
|
#ifndef KEEPINSYNCWMD
|
|
|
|
#define KEEPINSYNCWMD
|
|
|
|
enum acTKScenario {
|
|
|
|
ACTK_ALONE = 0,
|
|
|
|
ACTK_INSECURE,
|
|
|
|
ACTK_OTEA,
|
|
|
|
ACTK_OTEB,
|
|
|
|
ACTK_OTEC,
|
|
|
|
ACTK_PROD,
|
|
|
|
N_ACTK_SCENARIOS
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2014-01-03 05:52:15 +00:00
|
|
|
using namespace log4cpp;
|
|
|
|
|
|
|
|
class mdLogger {
|
|
|
|
public:
|
|
|
|
char *logPath;
|
|
|
|
|
2014-01-18 20:35:18 +00:00
|
|
|
mdLogger() {};
|
2014-01-03 05:52:15 +00:00
|
|
|
|
2014-01-18 20:35:18 +00:00
|
|
|
void init(bool isMain);
|
2014-01-03 05:52:15 +00:00
|
|
|
void logN(int n, const char *format, ...);
|
|
|
|
// log iff m positive and >= config.debugThreshold,
|
|
|
|
// set in powers of 10
|
|
|
|
void logNdebug(int m, int n, const char *format, ...);
|
|
|
|
void logNdev(int n, const char *format, ...);
|
|
|
|
|
|
|
|
~mdLogger(){};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|