1#define LOGIT_BASE_PATH "E:\\_repoz\\log-it-cpp"
2#define LOGIT_SHORT_NAME
7#define UNIQUE_LOGGER_ID 2
18 std::cout <<
"Starting logging example with short macros..." << std::endl;
26 LOG_I(
"Info message using short macro");
29 LOG_W_PRINT(
"Warning message with color: ",
COLORS::RED);
30 LOG_WP(
"Warning message with color: ",
COLORS::RED);
33 LOG_W_PRINTF(
"Warning message with color: %d",
static_cast<int>(
COLORS::RED));
34 LOG_WPF(
"Warning message with color: %d",
static_cast<int>(
COLORS::RED));
38 LOG_WF(
"%.4d",
static_cast<int>(
COLORS::RED), temp);
41 LOG_E_PRINT(
"Error message with float value: ", 42.42f);
42 LOG_EP(
"Error message with float value: ", 42.42f);
44 const int error_code = 404;
45 LOG_F(
"Fatal error message", error_code);
48 LOG_S_INFO() <<
"Stream-based info logging with short macro. Integer value: " << 123;
49 LOG_S_WARN() <<
"Stream-based warning with color: " <<
COLORS::GREEN;
52 LOG_S_TRACE_TO(
UNIQUE_LOGGER_ID) <<
"Trace logging to unique file with short macro";
55 LOG_IPF(
"Formatted info log: float=%.2f, int=%d", 3.14, 42);
56 LOG_E_PRINTF(
"Formatted error log: value=%d", 100);
61 std::cout <<
"Logging example with short macros 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...