1#define LOGIT_BASE_PATH "E:\\_repoz\\log-it-cpp"
21 std::cout <<
"Starting logging example..." << std::endl;
29 float someFloat = 123.456f;
33 LOGIT_INFO(
"This is an informational message", someFloat, someInt);
34 LOGIT_DEBUG_IF(
true,
"This debug message is conditionally logged.");
35 LOGIT_WARN(
"Warning: Something might go wrong here!");
36 LOGIT_ERROR(
"An error has occurred during processing with color", color);
37 LOGIT_FATAL(
"Fatal error! Immediate attention required!");
44 LOGIT_STREAM_INFO() <<
"Stream logging: float=" << someFloat <<
", int=" << someInt <<
", color=" << color;
52 throw std::runtime_error(
"An example runtime error");
53 }
catch (
const std::exception& ex) {
65 std::cout <<
"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_FORMAT_INFO(fmt,...)
#define LOGIT_DEBUG_IF(condition,...)
#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_INFO()
#define LOGIT_STREAM_TRACE_TO(index)
#define LOGIT_STREAM_ERROR()
#define LOGIT_PRINT_INFO(...)
Structure for storing values of various types, including enumerations.
std::string to_string() const
Method to get the value as a string.