-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogger.cpp
More file actions
37 lines (30 loc) · 814 Bytes
/
logger.cpp
File metadata and controls
37 lines (30 loc) · 814 Bytes
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
34
35
36
37
#include "logger.h"
#include <map>
#include <string>
#include <utility>
namespace casino {
namespace logger {
LEVEL GLOBAL_DEFAULT_LOG_LEVEL = WARNING;
const std::map<COLOR, std::pair<int, int>> Logger::COLOR_VALUE_MAP = {
{ GREEN, { 0, 32 } },
{ WHITE, { 0, 30 } },
{ YELLOW, { 0, 33 } },
{ RED, { 0, 31 } },
{ BOLD_RED, { 1, 41 } }
};
const std::map<LEVEL, COLOR> Logger::LEVEL_COLOR_MAP = {
{ DEBUG, GREEN },
{ INFO, WHITE },
{ WARNING, YELLOW },
{ ERROR, RED },
{ SEVERE, BOLD_RED }
};
const std::map<LEVEL, std::string> Logger::LEVEL_NAME_MAP = {
{ DEBUG, "DEBUG" },
{ INFO, "INFO" },
{ WARNING, "WARN" },
{ ERROR, "ERROR" },
{ SEVERE, "SEVERE" }
};
}
}