![]() |
LogIt++
|
Configuration macros for the LogIt logging system. More...
Go to the source code of this file.
Macros | |
#define | _LOGIT_CONFIG_HPP_INCLUDED |
#define | LOGIT_CURRENT_TIMESTAMP_MS() |
Macro to get the current timestamp in milliseconds. | |
#define | LOGIT_BASE_PATH {} |
Defines the base path used for log file paths. | |
#define | LOGIT_DEFAULT_COLOR logit::TextColor::LightGray |
Defines the default color for console output. | |
Log Level Colors | |
Default colors for each log level. | |
#define | LOGIT_COLOR_TRACE logit::TextColor::DarkGray |
#define | LOGIT_COLOR_DEBUG logit::TextColor::Blue |
#define | LOGIT_COLOR_INFO logit::TextColor::Green |
#define | LOGIT_COLOR_WARN logit::TextColor::Yellow |
#define | LOGIT_COLOR_ERROR logit::TextColor::Red |
#define | LOGIT_COLOR_FATAL logit::TextColor::Magenta |
#define | LOGIT_COLOR_DEFAULT logit::TextColor::White |
File Logger Settings | |
Configuration macros for file-based loggers. | |
#define | LOGIT_CONSOLE_PATTERN "%H:%M:%S.%e | %^%N([%50!g:%#])%v%$" |
Defines the default log pattern for the console logger. | |
#define | LOGIT_FILE_LOGGER_PATH "data/logs" |
Defines the default directory path for log files. | |
#define | LOGIT_UNIQUE_FILE_LOGGER_PATH "data/logs/unique_logs" |
Defines the default directory path for unique log files. | |
#define | LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS 30 |
Defines the number of days after which old log files are deleted. | |
#define | LOGIT_FILE_LOGGER_PATTERN "[%Y-%m-%d %H:%M:%S.%e] [%-5l] [%60!@] [thread:%t] %SC%v" |
Defines the default log pattern for file-based loggers. | |
#define | LOGIT_UNIQUE_FILE_LOGGER_PATTERN "%v" |
Defines the default log pattern for unique file-based loggers. | |
#define | LOGIT_UNIQUE_FILE_LOGGER_HASH_LENGTH 8 |
Defines the default hash length for unique file names. | |
Configuration macros for the LogIt logging system.
Definition in file LogItConfig.hpp.
#define _LOGIT_CONFIG_HPP_INCLUDED |
Definition at line 3 of file LogItConfig.hpp.
#define LOGIT_COLOR_DEBUG logit::TextColor::Blue |
Definition at line 34 of file LogItConfig.hpp.
#define LOGIT_COLOR_DEFAULT logit::TextColor::White |
Definition at line 54 of file LogItConfig.hpp.
#define LOGIT_COLOR_ERROR logit::TextColor::Red |
Definition at line 46 of file LogItConfig.hpp.
#define LOGIT_COLOR_FATAL logit::TextColor::Magenta |
Definition at line 50 of file LogItConfig.hpp.
#define LOGIT_COLOR_INFO logit::TextColor::Green |
Definition at line 38 of file LogItConfig.hpp.
#define LOGIT_COLOR_TRACE logit::TextColor::DarkGray |
Definition at line 30 of file LogItConfig.hpp.
#define LOGIT_COLOR_WARN logit::TextColor::Yellow |
Definition at line 42 of file LogItConfig.hpp.
#define LOGIT_CONSOLE_PATTERN "%H:%M:%S.%e | %^%N([%50!g:%#])%v%$" |
Defines the default log pattern for the console logger.
If LOGIT_CONSOLE_PATTERN
is not defined, it defaults to %H:%M:%S.%e | %^N([%50!g:%#])%v%$
.
This pattern controls the formatting of log messages sent to the console, including timestamp, message, and color.
Definition at line 77 of file LogItConfig.hpp.
#define LOGIT_CURRENT_TIMESTAMP_MS | ( | ) |
Macro to get the current timestamp in milliseconds.
If LOGIT_CURRENT_TIMESTAMP_MS is not defined, it uses std::chrono
to return the current time in milliseconds.
This macro can be overridden to provide a custom method for generating timestamps if needed.
Definition at line 63 of file LogItConfig.hpp.
#define LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS 30 |
Defines the number of days after which old log files are deleted.
If LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS
is not defined, it defaults to 30 days.
This macro controls the log file retention policy by specifying the maximum age of log files.
Definition at line 103 of file LogItConfig.hpp.
#define LOGIT_FILE_LOGGER_PATH "data/logs" |
Defines the default directory path for log files.
If LOGIT_FILE_LOGGER_PATH
is not defined, it defaults to "data/logs".
This macro specifies the directory where regular log files will be stored. The default path is relative to the application's execution directory.
Definition at line 86 of file LogItConfig.hpp.
#define LOGIT_FILE_LOGGER_PATTERN "[%Y-%m-%d %H:%M:%S.%e] [%-5l] [%60!@] [thread:%t] %SC%v" |
Defines the default log pattern for file-based loggers.
If LOGIT_FILE_LOGGER_PATTERN
is not defined, it defaults to [%Y-%m-%d %H:%M:%S.%e] [%-5l] [%60!@] [thread:%t] %SC%v
.
This pattern controls the formatting of log messages written to log files, including timestamp, filename, line number, function, and thread information.
Definition at line 111 of file LogItConfig.hpp.
#define LOGIT_UNIQUE_FILE_LOGGER_HASH_LENGTH 8 |
Defines the default hash length for unique file names.
If LOGIT_UNIQUE_FILE_LOGGER_HASH_LENGTH
is not defined, it defaults to 8.
Definition at line 123 of file LogItConfig.hpp.
#define LOGIT_UNIQUE_FILE_LOGGER_PATH "data/logs/unique_logs" |
Defines the default directory path for unique log files.
If LOGIT_UNIQUE_FILE_LOGGER_PATH
is not defined, it defaults to "data/logs/unique_logs".
This macro specifies the directory where unique log files, created by UniqueFileLogger
, will be stored. Each log message will generate a new file in this directory.
Definition at line 95 of file LogItConfig.hpp.
#define LOGIT_UNIQUE_FILE_LOGGER_PATTERN "%v" |
Defines the default log pattern for unique file-based loggers.
If LOGIT_UNIQUE_FILE_LOGGER_PATTERN
is not defined, it defaults to "%v".
Definition at line 117 of file LogItConfig.hpp.