mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 23:21:20 -04:00
Add SetLevel function & Verbose log level
This commit is contained in:
parent
554810fbeb
commit
1537fdbb76
@ -39,6 +39,11 @@ const Log &Log::Get()
|
||||
return *sLog;
|
||||
}
|
||||
|
||||
void Log::SetLevel(int level)
|
||||
{
|
||||
sLog->logLevel = level;
|
||||
}
|
||||
|
||||
const char* getTime()
|
||||
{
|
||||
time_t t = time(0);
|
||||
|
@ -22,14 +22,16 @@ class Log
|
||||
public:
|
||||
enum
|
||||
{
|
||||
LOG_INFO = 0,
|
||||
LOG_VERBOSE = 0,
|
||||
LOG_INFO,
|
||||
LOG_WARN,
|
||||
LOG_ERROR,
|
||||
LOG_FATAL,
|
||||
LOG_FATAL
|
||||
};
|
||||
static void Create(int logLevel);
|
||||
static void Delete();
|
||||
static const Log &Get();
|
||||
static void SetLevel(int level);
|
||||
void print(int level, const char *file, int line, const char *message, ...) const;
|
||||
private:
|
||||
Log(int logLevel);
|
||||
@ -39,7 +41,6 @@ class Log
|
||||
Log& operator=(Log& );
|
||||
static Log *sLog;
|
||||
int logLevel;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user