-
Notifications
You must be signed in to change notification settings - Fork 0
/
Logger.h
33 lines (28 loc) · 615 Bytes
/
Logger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <string>
#include <iostream>
#include <mutex>
#include <chrono>
enum LogType
{
WARNING,
INFO,
ERROR
};
class Logger
{
private:
static int m_verbosityLevel;
static std::mutex m;
static std::chrono::time_point<std::chrono::high_resolution_clock> startTime;
public:
static void Log(const std::string&, const std::string&, const int, const LogType& type = LogType::INFO);
static void SetVerbosity(const unsigned int verbosityLevel)
{
m_verbosityLevel = verbosityLevel;
}
static unsigned int GetVerbosity()
{
return m_verbosityLevel;
}
};