1#define LOGIT_BASE_PATH "E:\\_repoz\\log-it-cpp"
4#define LOGIT_CONSOLE_PATTERN "%Y-%m-%d %H:%M:%S [%L] %v"
5#define LOGIT_FILE_LOGGER_PATH "E:\\logs\\default_logs"
6#define LOGIT_UNIQUE_FILE_LOGGER_PATH "E:\\logs\\unique_logs"
7#define LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS 10
23 std::cout <<
"Starting customized logging example..." << std::endl;
31 float someFloat = 42.42f;
35 LOGIT_INFO(
"Logging an informational message with customized settings", someFloat, someInt, level);
36 LOGIT_WARN(
"Warning: Potential issue with customized log settings!");
45 throw std::runtime_error(
"A runtime error occurred");
46 }
catch (
const std::exception& ex) {
54 std::cout <<
"Customized logging example completed." << std::endl;
Main header file for the LogIt++ library.
#define LOGIT_ADD_CONSOLE_DEFAULT()
Macro for adding the default console logger. This logger uses the default format pattern and asynchro...
#define LOGIT_WAIT()
Macro for waiting for all asynchronous loggers to finish processing.
#define LOGIT_ADD_FILE_LOGGER_DEFAULT()
Macro for adding the default file logger. This logger writes logs to the default file path and delete...
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT_SINGLE_MODE()
Macro for adding the default unique file logger in single_mode. This macro adds a UniqueFileLogger wi...
#define LOGIT_GET_LAST_FILE_NAME(logger_index)
Macro for retrieving the last log file name from a specific logger.
#define LOGIT_STREAM_TRACE_TO(index)
#define LOGIT_PRINT_INFO(...)