extend logger (#34)

This commit is contained in:
redPanther
2016-06-21 21:41:26 +02:00
committed by brindosch
parent eccd4e6637
commit f48af9daff
3 changed files with 57 additions and 17 deletions

View File

@@ -25,9 +25,11 @@
class Logger
{
public:
enum LogLevel { DEBUG=0, INFO=1,WARNING=2,ERROR=3 };
enum LogLevel { UNSET=0,DEBUG=1, INFO=2,WARNING=3,ERROR=4 };
static Logger* getInstance(std::string name="", LogLevel minLevel=Logger::INFO);
static void deleteInstance(std::string name="");
static void setLogLevel(LogLevel level,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; };
@@ -38,6 +40,7 @@ protected:
private:
static std::map<std::string,Logger*> *LoggerMap;
static LogLevel GLOBAL_MIN_LOG_LEVEL;
std::string _name;
std::string _appname;