LogIt++
Loading...
Searching...
No Matches
LogItConfig.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _LOGIT_CONFIG_HPP_INCLUDED
3#define _LOGIT_CONFIG_HPP_INCLUDED
6
26
29#ifndef LOGIT_BASE_PATH
30 #define LOGIT_BASE_PATH {}
31#endif
32
37#ifndef LOGIT_DEFAULT_COLOR
38 #define LOGIT_DEFAULT_COLOR logit::TextColor::LightGray
39#endif
40
44#ifndef LOGIT_COLOR_TRACE
45 #define LOGIT_COLOR_TRACE logit::TextColor::DarkGray
46#endif
47
48#ifndef LOGIT_COLOR_DEBUG
49 #define LOGIT_COLOR_DEBUG logit::TextColor::Blue
50#endif
51
52#ifndef LOGIT_COLOR_INFO
53 #define LOGIT_COLOR_INFO logit::TextColor::Green
54#endif
55
56#ifndef LOGIT_COLOR_WARN
57 #define LOGIT_COLOR_WARN logit::TextColor::Yellow
58#endif
59
60#ifndef LOGIT_COLOR_ERROR
61 #define LOGIT_COLOR_ERROR logit::TextColor::Red
62#endif
63
64#ifndef LOGIT_COLOR_FATAL
65 #define LOGIT_COLOR_FATAL logit::TextColor::Magenta
66#endif
67
68#ifndef LOGIT_COLOR_DEFAULT
69 #define LOGIT_COLOR_DEFAULT logit::TextColor::White
70#endif
72
77#ifndef LOGIT_CURRENT_TIMESTAMP_MS
78 #define LOGIT_CURRENT_TIMESTAMP_MS() \
79 (std::chrono::duration_cast<std::chrono::milliseconds>( \
80 std::chrono::system_clock::now().time_since_epoch()).count())
81#endif
82
86
91#ifndef LOGIT_CONSOLE_PATTERN
92 #define LOGIT_CONSOLE_PATTERN "%H:%M:%S.%e | %^%N([%50!g:%#])%v%$"
93#endif
94
100#ifndef LOGIT_FILE_LOGGER_PATH
101 #define LOGIT_FILE_LOGGER_PATH "data/logs"
102#endif
103
109#ifndef LOGIT_UNIQUE_FILE_LOGGER_PATH
110 #define LOGIT_UNIQUE_FILE_LOGGER_PATH "data/logs/unique_logs"
111#endif
112
117#ifndef LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS
118 #define LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS 30
119#endif
120
126#ifndef LOGIT_FILE_LOGGER_PATTERN
127 #define LOGIT_FILE_LOGGER_PATTERN "[%Y-%m-%d %H:%M:%S.%e] [%g:%#] [%!] [thread:%t] [%l] %SC%v"
128#endif
129
132#ifndef LOGIT_UNIQUE_FILE_LOGGER_PATTERN
133 #define LOGIT_UNIQUE_FILE_LOGGER_PATTERN "%v"
134#endif
135
138#ifndef LOGIT_UNIQUE_FILE_LOGGER_HASH_LENGTH
139 #define LOGIT_UNIQUE_FILE_LOGGER_HASH_LENGTH 8
140#endif
141
143
145
146#endif // _LOGIT_CONFIG_HPP_INCLUDED