LogIt++
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _LOGIT_CONFIG_HPP_INCLUDED
3#define _LOGIT_CONFIG_HPP_INCLUDED
4
7
10
11#ifndef LOGIT_BASE_PATH
14 #define LOGIT_BASE_PATH {}
15#endif
16
17#ifndef LOGIT_DEFAULT_COLOR
22 #define LOGIT_DEFAULT_COLOR logit::TextColor::LightGray
23#endif
24
28
29#ifndef LOGIT_COLOR_TRACE
30 #define LOGIT_COLOR_TRACE logit::TextColor::DarkGray
31#endif
32
33#ifndef LOGIT_COLOR_DEBUG
34 #define LOGIT_COLOR_DEBUG logit::TextColor::Blue
35#endif
36
37#ifndef LOGIT_COLOR_INFO
38 #define LOGIT_COLOR_INFO logit::TextColor::Green
39#endif
40
41#ifndef LOGIT_COLOR_WARN
42 #define LOGIT_COLOR_WARN logit::TextColor::Yellow
43#endif
44
45#ifndef LOGIT_COLOR_ERROR
46 #define LOGIT_COLOR_ERROR logit::TextColor::Red
47#endif
48
49#ifndef LOGIT_COLOR_FATAL
50 #define LOGIT_COLOR_FATAL logit::TextColor::Magenta
51#endif
52
53#ifndef LOGIT_COLOR_DEFAULT
54 #define LOGIT_COLOR_DEFAULT logit::TextColor::White
55#endif
57
62#ifndef LOGIT_CURRENT_TIMESTAMP_MS
63 #define LOGIT_CURRENT_TIMESTAMP_MS() \
64 (std::chrono::duration_cast<std::chrono::milliseconds>( \
65 std::chrono::system_clock::now().time_since_epoch()).count())
66#endif
67
71
76#ifndef LOGIT_CONSOLE_PATTERN
77 #define LOGIT_CONSOLE_PATTERN "%H:%M:%S.%e | %^%N([%50!g:%#])%v%$"
78#endif
79
85#ifndef LOGIT_FILE_LOGGER_PATH
86 #define LOGIT_FILE_LOGGER_PATH "data/logs"
87#endif
88
94#ifndef LOGIT_UNIQUE_FILE_LOGGER_PATH
95 #define LOGIT_UNIQUE_FILE_LOGGER_PATH "data/logs/unique_logs"
96#endif
97
102#ifndef LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS
103 #define LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS 30
104#endif
105
110#ifndef LOGIT_FILE_LOGGER_PATTERN
111 #define LOGIT_FILE_LOGGER_PATTERN "[%Y-%m-%d %H:%M:%S.%e] [%-5l] [%60!@] [thread:%t] %SC%v"
112#endif
113
114#ifndef LOGIT_FILE_LOGGER_MAX_FILE_SIZE_BYTES
115 #define LOGIT_FILE_LOGGER_MAX_FILE_SIZE_BYTES 0
116#endif
117#ifndef LOGIT_FILE_LOGGER_MAX_ROTATED_FILES
118 #define LOGIT_FILE_LOGGER_MAX_ROTATED_FILES 0
119#endif
120#ifndef LOGIT_FILE_LOGGER_COMPRESS_ROTATED
121 #define LOGIT_FILE_LOGGER_COMPRESS_ROTATED 0
122#endif
123#ifndef LOGIT_FILE_LOGGER_COMPRESS_CMD
124 #define LOGIT_FILE_LOGGER_COMPRESS_CMD ""
125#endif
126
129#ifndef LOGIT_UNIQUE_FILE_LOGGER_PATTERN
130 #define LOGIT_UNIQUE_FILE_LOGGER_PATTERN "%v"
131#endif
132
135#ifndef LOGIT_UNIQUE_FILE_LOGGER_HASH_LENGTH
136 #define LOGIT_UNIQUE_FILE_LOGGER_HASH_LENGTH 8
137#endif
138
140
142
143#endif // _LOGIT_CONFIG_HPP_INCLUDED