make log level settings avail in config file (#63)

This commit is contained in:
redPanther
2016-06-27 23:56:21 +02:00
committed by brindosch
parent 809ab82524
commit 03ac5689cf
6 changed files with 49 additions and 6 deletions

View File

@@ -27,12 +27,14 @@ class Logger
public:
enum LogLevel { UNSET=0,DEBUG=1, INFO=2,WARNING=3,ERROR=4,OFF=5 };
static Logger* getInstance(std::string name="", LogLevel minLevel=Logger::INFO);
static void deleteInstance(std::string name="");
static void setLogLevel(LogLevel level,std::string name="");
static Logger* getInstance(std::string name="", LogLevel minLevel=Logger::INFO);
static void deleteInstance(std::string name="");
static void setLogLevel(LogLevel level,std::string name="");
static LogLevel getLogLevel(std::string name="");
void Message(LogLevel level, const char* sourceFile, const char* func, unsigned int line, const char* fmt, ...);
void setMinLevel(LogLevel level) { _minLevel = level; };
void Message(LogLevel level, const char* sourceFile, const char* func, unsigned int line, const char* fmt, ...);
void setMinLevel(LogLevel level) { _minLevel = level; };
LogLevel getMinLevel() { return _minLevel; };
protected:
Logger( std::string name="", LogLevel minLevel=INFO);