LogIt++
|
A collection of macros for streamlined logging operations. More...
Macros | |
#define | LOGIT_FUNCTION __func__ |
#define | LOGIT_ENUM_TO_STR_CASE(value) |
#define | LOGIT_LOG_AND_RETURN_NOARGS(level, format) |
Logs a message without arguments. | |
#define | LOGIT_LOG_AND_RETURN_NOARGS_WITH_INDEX(level, index, format) |
Logs a message to a specific logger without arguments. | |
#define | LOGIT_LOG_AND_RETURN(level, format, arg_names, ...) |
Logs a message with arguments. | |
#define | LOGIT_LOG_AND_RETURN_PRINT(level, arg_names, ...) |
Logs a message with arguments, but prints them without using a format string. | |
#define | LOGIT_LOG_AND_RETURN_WITH_INDEX(level, index, format, arg_names, ...) |
Logs a message with arguments to a specific logger. | |
#define | LOGIT_LOG_AND_RETURN_PRINT_WITH_INDEX(level, index, arg_names, ...) |
Logs a message with arguments to a specific logger, but prints them without using a format string. | |
#define | LOGIT_TRACE(...) |
#define | LOGIT_TRACE0() |
#define | LOGIT_0TRACE() |
#define | LOGIT_0_TRACE() |
#define | LOGIT_NOARGS_TRACE() |
#define | LOGIT_FORMAT_TRACE(fmt, ...) |
#define | LOGIT_PRINT_TRACE(...) |
#define | LOGIT_PRINTF_TRACE(fmt, ...) |
#define | LOGIT_TRACE_TO(index, ...) |
#define | LOGIT_TRACE0_TO(index) |
#define | LOGIT_0TRACE_TO(index) |
#define | LOGIT_0_TRACE_TO(index) |
#define | LOGIT_NOARGS_TRACE_TO(index) |
#define | LOGIT_FORMAT_TRACE_TO(index, fmt, ...) |
#define | LOGIT_PRINT_TRACE_TO(index, ...) |
#define | LOGIT_PRINTF_TRACE_TO(index, fmt, ...) |
#define | LOGIT_INFO(...) |
#define | LOGIT_INFO0() |
#define | LOGIT_0INFO() |
#define | LOGIT_0_INFO() |
#define | LOGIT_NOARGS_INFO() |
#define | LOGIT_FORMAT_INFO(fmt, ...) |
#define | LOGIT_PRINT_INFO(...) |
#define | LOGIT_PRINTF_INFO(fmt, ...) |
#define | LOGIT_INFO_TO(index, ...) |
#define | LOGIT_INFO0_TO(index) |
#define | LOGIT_0INFO_TO(index) |
#define | LOGIT_0_INFO_TO(index) |
#define | LOGIT_NOARGS_INFO_TO(index) |
#define | LOGIT_FORMAT_INFO_TO(index, fmt, ...) |
#define | LOGIT_PRINT_INFO_TO(index, ...) |
#define | LOGIT_PRINTF_INFO_TO(index, fmt, ...) |
#define | LOGIT_DEBUG(...) |
#define | LOGIT_DEBUG0() |
#define | LOGIT_0DEBUG() |
#define | LOGIT_0_DEBUG() |
#define | LOGIT_NOARGS_DEBUG() |
#define | LOGIT_FORMAT_DEBUG(fmt, ...) |
#define | LOGIT_PRINT_DEBUG(...) |
#define | LOGIT_PRINTF_DEBUG(fmt, ...) |
#define | LOGIT_DEBUG_TO(index, ...) |
#define | LOGIT_DEBUG0_TO(index) |
#define | LOGIT_0DEBUG_TO(index) |
#define | LOGIT_0_DEBUG_TO(index) |
#define | LOGIT_NOARGS_DEBUG_TO(index) |
#define | LOGIT_FORMAT_DEBUG_TO(index, fmt, ...) |
#define | LOGIT_PRINT_DEBUG_TO(index, ...) |
#define | LOGIT_PRINTF_DEBUG_TO(index, fmt, ...) |
#define | LOGIT_WARN(...) |
#define | LOGIT_WARN0() |
#define | LOGIT_0WARN() |
#define | LOGIT_0_WARN() |
#define | LOGIT_NOARGS_WARN() |
#define | LOGIT_FORMAT_WARN(fmt, ...) |
#define | LOGIT_PRINT_WARN(...) |
#define | LOGIT_PRINTF_WARN(fmt, ...) |
#define | LOGIT_WARN_TO(index, ...) |
#define | LOGIT_WARN0_TO(index) |
#define | LOGIT_0WARN_TO(index) |
#define | LOGIT_0_WARN_TO(index) |
#define | LOGIT_NOARGS_WARN_TO(index) |
#define | LOGIT_FORMAT_WARN_TO(index, fmt, ...) |
#define | LOGIT_PRINT_WARN_TO(index, ...) |
#define | LOGIT_PRINTF_WARN_TO(index, fmt, ...) |
#define | LOGIT_ERROR(...) |
#define | LOGIT_ERROR0() |
#define | LOGIT_0ERROR() |
#define | LOGIT_0_ERROR() |
#define | LOGIT_NOARGS_ERROR() |
#define | LOGIT_FORMAT_ERROR(fmt, ...) |
#define | LOGIT_PRINT_ERROR(...) |
#define | LOGIT_PRINTF_ERROR(fmt, ...) |
#define | LOGIT_ERROR_TO(index, ...) |
#define | LOGIT_ERROR0_TO(index) |
#define | LOGIT_0ERROR_TO(index) |
#define | LOGIT_0_ERROR_TO(index) |
#define | LOGIT_NOARGS_ERROR_TO(index) |
#define | LOGIT_FORMAT_ERROR_TO(index, fmt, ...) |
#define | LOGIT_PRINT_ERROR_TO(index, ...) |
#define | LOGIT_PRINTF_ERROR_TO(index, fmt, ...) |
#define | LOGIT_FATAL(...) |
#define | LOGIT_FATAL0() |
#define | LOGIT_0FATAL() |
#define | LOGIT_0_FATAL() |
#define | LOGIT_NOARGS_FATAL() |
#define | LOGIT_FORMAT_FATAL(fmt, ...) |
#define | LOGIT_PRINT_FATAL(...) |
#define | LOGIT_PRINTF_FATAL(fmt, ...) |
#define | LOGIT_FATAL_TO(index, ...) |
#define | LOGIT_FATAL0_TO(index) |
#define | LOGIT_0FATAL_TO(index) |
#define | LOGIT_0_FATAL_TO(index) |
#define | LOGIT_NOARGS_FATAL_TO(index) |
#define | LOGIT_FORMAT_FATAL_TO(index, fmt, ...) |
#define | LOGIT_PRINT_FATAL_TO(index, ...) |
#define | LOGIT_PRINTF_FATAL_TO(index, fmt, ...) |
#define | LOGIT_ADD_LOGGER(logger_type, logger_args, formatter_type, formatter_args) |
Macro for adding a logger with a specific formatter. | |
#define | LOGIT_ADD_LOGGER_SINGLE_MODE(logger_type, logger_args, formatter_type, formatter_args) |
Macro for adding a logger with a specific formatter in single_mode. | |
#define | LOGIT_ADD_CONSOLE(pattern, async) |
Macro for adding a console logger with a specific pattern and mode. | |
#define | LOGIT_ADD_CONSOLE_SINGLE_MODE(pattern, async) |
Macro for adding a console logger in single_mode with a specific pattern and mode. | |
#define | LOGIT_ADD_CONSOLE_DEFAULT() |
Macro for adding the default console logger. This logger uses the default format pattern and asynchronous logging. This version uses new and std::unique_ptr for C++11 compatibility. | |
#define | LOGIT_ADD_CONSOLE_DEFAULT_SINGLE_MODE() |
Macro for adding the default console logger in single_mode. In single_mode, the console logger can only be invoked using macros like LOGIT_TRACE_TO . This version uses new and std::unique_ptr for C++11 compatibility. | |
#define | LOGIT_ADD_FILE_LOGGER(directory, async, auto_delete_days, pattern) |
Macro for adding a file logger with specific settings. | |
#define | LOGIT_ADD_FILE_LOGGER_SINGLE_MODE(directory, async, auto_delete_days, pattern) |
Macro for adding a file logger in single_mode with specific settings. | |
#define | LOGIT_ADD_FILE_LOGGER_DEFAULT() |
Macro for adding the default file logger. This logger writes logs to the default file path and deletes logs older than the default number of days. This version uses new and std::unique_ptr for C++11 compatibility. | |
#define | LOGIT_ADD_FILE_LOGGER_DEFAULT_SINGLE_MODE() |
Macro for adding the default file logger in single_mode. In single_mode, the file logger can only be invoked using macros like LOGIT_TRACE_TO . This version uses new and std::unique_ptr for C++11 compatibility. | |
#define | LOGIT_ADD_UNIQUE_FILE_LOGGER(directory, async, auto_delete_days, hash_length, pattern) |
Macro for adding a unique file logger with custom parameters. | |
#define | LOGIT_ADD_UNIQUE_FILE_LOGGER_SINGLE_MODE(directory, async, auto_delete_days, hash_length, pattern) |
Macro for adding a unique file logger in single_mode with custom parameters. | |
#define | LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT() |
Macro for adding the default unique file logger. This macro adds a UniqueFileLogger with default settings, which writes each log message to a new file. Log files are stored in the directory specified by LOGIT_UNIQUE_FILE_LOGGER_PATH , using asynchronous mode and auto-deleting logs older than the number of days specified by LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS . This version uses new and std::unique_ptr for C++11 compatibility. | |
#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 with default settings, which writes each log message to a new file. Log files are stored in the directory specified by LOGIT_UNIQUE_FILE_LOGGER_PATH , using asynchronous mode and auto-deleting logs older than the number of days specified by LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS . In single_mode, the unique file logger can only be invoked using macros like LOGIT_TRACE_TO . This version uses new and std::unique_ptr for C++11 compatibility. | |
#define | LOGIT_WAIT() |
Macro for waiting for all asynchronous loggers to finish processing. | |
Stream-Based Logging | |
Macros for logging using a stream-like syntax. | |
#define | LOGIT_STREAM(level) |
Begin a log stream for the specified log level. | |
#define | LOGIT_STREAM_WITH_INDEX(level, index) |
Begin a log stream for the specified log level, targeting a specific logger. | |
#define | LOGIT_STREAM_TRACE() |
#define | LOGIT_STREAM_DEBUG() |
#define | LOGIT_STREAM_INFO() |
#define | LOGIT_STREAM_WARN() |
#define | LOGIT_STREAM_ERROR() |
#define | LOGIT_STREAM_FATAL() |
#define | LOGIT_STREAM_TRACE_TO(index) |
#define | LOGIT_STREAM_DEBUG_TO(index) |
#define | LOGIT_STREAM_INFO_TO(index) |
#define | LOGIT_STREAM_WARN_TO(index) |
#define | LOGIT_STREAM_ERROR_TO(index) |
#define | LOGIT_STREAM_FATAL_TO(index) |
Conditional Logging | |
Macros for logging based on conditions. | |
#define | LOGIT_TRACE_IF(condition, ...) |
#define | LOGIT_TRACE0_IF(condition) |
#define | LOGIT_0TRACE_IF(condition) |
#define | LOGIT_0_TRACE_IF(condition) |
#define | LOGIT_NOARGS_TRACE_IF(condition) |
#define | LOGIT_FORMAT_TRACE_IF(condition, fmt, ...) |
#define | LOGIT_PRINT_TRACE_IF(condition, fmt) |
#define | LOGIT_PRINTF_TRACE_IF(condition, fmt, ...) |
#define | LOGIT_INFO_IF(condition, ...) |
#define | LOGIT_INFO0_IF(condition) |
#define | LOGIT_0INFO_IF(condition) |
#define | LOGIT_0_INFO_IF(condition) |
#define | LOGIT_NOARGS_INFO_IF(condition) |
#define | LOGIT_FORMAT_INFO_IF(condition, fmt, ...) |
#define | LOGIT_PRINT_INFO_IF(condition, fmt) |
#define | LOGIT_PRINTF_INFO_IF(condition, fmt, ...) |
#define | LOGIT_DEBUG_IF(condition, ...) |
#define | LOGIT_DEBUG0_IF(condition) |
#define | LOGIT_0DEBUG_IF(condition) |
#define | LOGIT_0_DEBUG_IF(condition) |
#define | LOGIT_NOARGS_DEBUG_IF(condition) |
#define | LOGIT_FORMAT_DEBUG_IF(condition, fmt, ...) |
#define | LOGIT_PRINT_DEBUG_IF(condition, fmt) |
#define | LOGIT_PRINTF_DEBUG_IF(condition, fmt, ...) |
#define | LOGIT_WARN_IF(condition, ...) |
#define | LOGIT_WARN0_IF(condition) |
#define | LOGIT_0WARN_IF(condition) |
#define | LOGIT_0_WARN_IF(condition) |
#define | LOGIT_NOARGS_WARN_IF(condition) |
#define | LOGIT_FORMAT_WARN_IF(condition, fmt, ...) |
#define | LOGIT_PRINT_WARN_IF(condition, fmt) |
#define | LOGIT_PRINTF_WARN_IF(condition, fmt, ...) |
#define | LOGIT_ERROR_IF(condition, ...) |
#define | LOGIT_ERROR0_IF(condition) |
#define | LOGIT_0ERROR_IF(condition) |
#define | LOGIT_0_ERROR_IF(condition) |
#define | LOGIT_NOARGS_ERROR_IF(condition) |
#define | LOGIT_FORMAT_ERROR_IF(condition, fmt, ...) |
#define | LOGIT_PRINT_ERROR_IF(condition, fmt) |
#define | LOGIT_PRINTF_ERROR_IF(condition, fmt, ...) |
#define | LOGIT_FATAL_IF(condition, ...) |
#define | LOGIT_FATAL0_IF(condition) |
#define | LOGIT_0FATAL_IF(condition) |
#define | LOGIT_0_FATAL_IF(condition) |
#define | LOGIT_NOARGS_FATAL_IF(condition) |
#define | LOGIT_FORMAT_FATAL_IF(condition, fmt, ...) |
#define | LOGIT_PRINT_FATAL_IF(condition, fmt) |
#define | LOGIT_PRINTF_FATAL_IF(condition, fmt, ...) |
Logger Management | |
Macros for managing loggers. | |
#define | LOGIT_GET_STRING_PARAM(logger_index, param) |
Macro for retrieving a string parameter from a logger. | |
#define | LOGIT_GET_INT_PARAM(logger_index, param) |
Macro for retrieving an integer parameter from a logger. | |
#define | LOGIT_GET_FLOAT_PARAM(logger_index, param) |
Macro for retrieving a floating-point parameter from a logger. | |
#define | LOGIT_GET_LAST_FILE_NAME(logger_index) |
Macro for retrieving the last log file name from a specific logger. | |
#define | LOGIT_GET_LAST_FILE_PATH(logger_index) |
Macro for retrieving the last log file path from a specific logger. | |
#define | LOGIT_GET_LAST_LOG_TIMESTAMP(logger_index) |
Macro for retrieving the timestamp of the last log from a specific logger. | |
#define | LOGIT_GET_TIME_SINCE_LAST_LOG(logger_index) |
Macro for retrieving the time since the last log from a specific logger. | |
#define | LOGIT_SET_LOGGER_ENABLED(logger_index, enabled) |
Enables or disables a logger by index. | |
#define | LOGIT_IS_LOGGER_ENABLED(logger_index) |
Checks whether a logger is enabled. | |
#define | LOGIT_SET_SINGLE_MODE(logger_index, single_mode) |
Sets the single-mode flag for a logger. | |
#define | LOGIT_IS_SINGLE_MODE(logger_index) |
Checks whether a logger is in single mode. | |
A collection of macros for streamlined logging operations.
This group includes macros for logging messages at various levels, adding loggers, managing log settings, and controlling loggers.
Basic Logging
Stream-Based Logging
Conditional Logging
Logger Management
#define LOGIT_0_DEBUG | ( | ) |
Definition at line 223 of file LogMacros.hpp.
#define LOGIT_0_DEBUG_IF | ( | condition | ) |
Definition at line 330 of file LogMacros.hpp.
#define LOGIT_0_DEBUG_TO | ( | index | ) |
Definition at line 233 of file LogMacros.hpp.
#define LOGIT_0_ERROR | ( | ) |
Definition at line 263 of file LogMacros.hpp.
#define LOGIT_0_ERROR_IF | ( | condition | ) |
Definition at line 350 of file LogMacros.hpp.
#define LOGIT_0_ERROR_TO | ( | index | ) |
Definition at line 273 of file LogMacros.hpp.
#define LOGIT_0_FATAL | ( | ) |
Definition at line 283 of file LogMacros.hpp.
#define LOGIT_0_FATAL_IF | ( | condition | ) |
Definition at line 360 of file LogMacros.hpp.
#define LOGIT_0_FATAL_TO | ( | index | ) |
Definition at line 293 of file LogMacros.hpp.
#define LOGIT_0_INFO | ( | ) |
Definition at line 203 of file LogMacros.hpp.
#define LOGIT_0_INFO_IF | ( | condition | ) |
Definition at line 320 of file LogMacros.hpp.
#define LOGIT_0_INFO_TO | ( | index | ) |
Definition at line 213 of file LogMacros.hpp.
#define LOGIT_0_TRACE | ( | ) |
Definition at line 183 of file LogMacros.hpp.
#define LOGIT_0_TRACE_IF | ( | condition | ) |
Definition at line 310 of file LogMacros.hpp.
#define LOGIT_0_TRACE_TO | ( | index | ) |
Definition at line 193 of file LogMacros.hpp.
#define LOGIT_0_WARN | ( | ) |
Definition at line 243 of file LogMacros.hpp.
#define LOGIT_0_WARN_IF | ( | condition | ) |
Definition at line 340 of file LogMacros.hpp.
#define LOGIT_0_WARN_TO | ( | index | ) |
Definition at line 253 of file LogMacros.hpp.
#define LOGIT_0DEBUG | ( | ) |
Definition at line 222 of file LogMacros.hpp.
#define LOGIT_0DEBUG_IF | ( | condition | ) |
Definition at line 329 of file LogMacros.hpp.
#define LOGIT_0DEBUG_TO | ( | index | ) |
Definition at line 232 of file LogMacros.hpp.
#define LOGIT_0ERROR | ( | ) |
Definition at line 262 of file LogMacros.hpp.
#define LOGIT_0ERROR_IF | ( | condition | ) |
Definition at line 349 of file LogMacros.hpp.
#define LOGIT_0ERROR_TO | ( | index | ) |
Definition at line 272 of file LogMacros.hpp.
#define LOGIT_0FATAL | ( | ) |
Definition at line 282 of file LogMacros.hpp.
#define LOGIT_0FATAL_IF | ( | condition | ) |
Definition at line 359 of file LogMacros.hpp.
#define LOGIT_0FATAL_TO | ( | index | ) |
Definition at line 292 of file LogMacros.hpp.
#define LOGIT_0INFO | ( | ) |
Definition at line 202 of file LogMacros.hpp.
#define LOGIT_0INFO_IF | ( | condition | ) |
Definition at line 319 of file LogMacros.hpp.
#define LOGIT_0INFO_TO | ( | index | ) |
Definition at line 212 of file LogMacros.hpp.
#define LOGIT_0TRACE | ( | ) |
Definition at line 182 of file LogMacros.hpp.
#define LOGIT_0TRACE_IF | ( | condition | ) |
Definition at line 309 of file LogMacros.hpp.
#define LOGIT_0TRACE_TO | ( | index | ) |
Definition at line 192 of file LogMacros.hpp.
#define LOGIT_0WARN | ( | ) |
Definition at line 242 of file LogMacros.hpp.
#define LOGIT_0WARN_IF | ( | condition | ) |
Definition at line 339 of file LogMacros.hpp.
#define LOGIT_0WARN_TO | ( | index | ) |
Definition at line 252 of file LogMacros.hpp.
#define LOGIT_ADD_CONSOLE | ( | pattern, | |
async ) |
Macro for adding a console logger with a specific pattern and mode.
pattern | The format pattern for log messages. |
async | Boolean indicating whether logging should be asynchronous (true) or synchronous (false). This version uses new and std::unique_ptr for C++11 compatibility. |
Definition at line 758 of file LogMacros.hpp.
#define LOGIT_ADD_CONSOLE_DEFAULT | ( | ) |
Macro for adding the default console logger. This logger uses the default format pattern and asynchronous logging. This version uses new
and std::unique_ptr
for C++11 compatibility.
Definition at line 778 of file LogMacros.hpp.
#define LOGIT_ADD_CONSOLE_DEFAULT_SINGLE_MODE | ( | ) |
Macro for adding the default console logger in single_mode. In single_mode, the console logger can only be invoked using macros like LOGIT_TRACE_TO
. This version uses new
and std::unique_ptr
for C++11 compatibility.
Definition at line 788 of file LogMacros.hpp.
#define LOGIT_ADD_CONSOLE_SINGLE_MODE | ( | pattern, | |
async ) |
Macro for adding a console logger in single_mode with a specific pattern and mode.
pattern | The format pattern for log messages. |
async | Boolean indicating whether logging should be asynchronous (true) or synchronous (false). In single_mode, the console logger can only be invoked using macros like LOGIT_TRACE_TO . This version uses new and std::unique_ptr for C++11 compatibility. |
Definition at line 769 of file LogMacros.hpp.
#define LOGIT_ADD_FILE_LOGGER | ( | directory, | |
async, | |||
auto_delete_days, | |||
pattern ) |
Macro for adding a file logger with specific settings.
directory | The directory where log files will be stored. |
async | Boolean indicating whether logging should be asynchronous (true) or synchronous (false). |
auto_delete_days | Number of days after which old log files are deleted. |
pattern | The format pattern for log messages. This version uses new and std::unique_ptr for C++11 compatibility. |
Definition at line 801 of file LogMacros.hpp.
#define LOGIT_ADD_FILE_LOGGER_DEFAULT | ( | ) |
Macro for adding the default file logger. This logger writes logs to the default file path and deletes logs older than the default number of days. This version uses new
and std::unique_ptr
for C++11 compatibility.
Definition at line 824 of file LogMacros.hpp.
#define LOGIT_ADD_FILE_LOGGER_DEFAULT_SINGLE_MODE | ( | ) |
Macro for adding the default file logger in single_mode. In single_mode, the file logger can only be invoked using macros like LOGIT_TRACE_TO
. This version uses new
and std::unique_ptr
for C++11 compatibility.
Definition at line 835 of file LogMacros.hpp.
#define LOGIT_ADD_FILE_LOGGER_SINGLE_MODE | ( | directory, | |
async, | |||
auto_delete_days, | |||
pattern ) |
Macro for adding a file logger in single_mode with specific settings.
directory | The directory where log files will be stored. |
async | Boolean indicating whether logging should be asynchronous (true) or synchronous (false). |
auto_delete_days | Number of days after which old log files are deleted. |
pattern | The format pattern for log messages. In single_mode, the file logger can only be invoked using macros like LOGIT_TRACE_TO . This version uses new and std::unique_ptr for C++11 compatibility. |
Definition at line 814 of file LogMacros.hpp.
#define LOGIT_ADD_LOGGER | ( | logger_type, | |
logger_args, | |||
formatter_type, | |||
formatter_args ) |
Macro for adding a logger with a specific formatter.
logger_type | The type of logger (e.g., ConsoleLogger ). |
logger_args | Arguments for the logger constructor, enclosed in parentheses. |
formatter_type | The type of formatter (e.g., SimpleLogFormatter ). |
formatter_args | Arguments for the formatter constructor, enclosed in parentheses. This version uses new and std::unique_ptr for C++11 compatibility. |
Definition at line 735 of file LogMacros.hpp.
#define LOGIT_ADD_LOGGER_SINGLE_MODE | ( | logger_type, | |
logger_args, | |||
formatter_type, | |||
formatter_args ) |
Macro for adding a logger with a specific formatter in single_mode.
logger_type | The type of logger (e.g., ConsoleLogger ). |
logger_args | Arguments for the logger constructor, enclosed in parentheses. |
formatter_type | The type of formatter (e.g., SimpleLogFormatter ). |
formatter_args | Arguments for the formatter constructor, enclosed in parentheses. In single_mode, loggers can only be invoked explicitly using macros like LOGIT_TRACE_TO . This version uses new and std::unique_ptr for C++11 compatibility. |
Definition at line 748 of file LogMacros.hpp.
#define LOGIT_ADD_UNIQUE_FILE_LOGGER | ( | directory, | |
async, | |||
auto_delete_days, | |||
hash_length, | |||
pattern ) |
Macro for adding a unique file logger with custom parameters.
directory | The directory where log files will be stored. |
async | Boolean indicating whether logging should be asynchronous (true) or synchronous (false). |
auto_delete_days | Number of days after which old log files are deleted. |
hash_length | The length of the hash to be appended to the log file name. |
pattern | The format pattern for log messages. This version uses new and std::unique_ptr for C++11 compatibility. |
Definition at line 851 of file LogMacros.hpp.
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT | ( | ) |
Macro for adding the default unique file logger. This macro adds a UniqueFileLogger
with default settings, which writes each log message to a new file. Log files are stored in the directory specified by LOGIT_UNIQUE_FILE_LOGGER_PATH
, using asynchronous mode and auto-deleting logs older than the number of days specified by LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS
. This version uses new
and std::unique_ptr
for C++11 compatibility.
Definition at line 877 of file LogMacros.hpp.
#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
with default settings, which writes each log message to a new file. Log files are stored in the directory specified by LOGIT_UNIQUE_FILE_LOGGER_PATH
, using asynchronous mode and auto-deleting logs older than the number of days specified by LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS
. In single_mode, the unique file logger can only be invoked using macros like LOGIT_TRACE_TO
. This version uses new
and std::unique_ptr
for C++11 compatibility.
Definition at line 890 of file LogMacros.hpp.
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_SINGLE_MODE | ( | directory, | |
async, | |||
auto_delete_days, | |||
hash_length, | |||
pattern ) |
Macro for adding a unique file logger in single_mode with custom parameters.
directory | The directory where log files will be stored. |
async | Boolean indicating whether logging should be asynchronous (true) or synchronous (false). |
auto_delete_days | Number of days after which old log files are deleted. |
hash_length | The length of the hash to be appended to the log file name. |
pattern | The format pattern for log messages. In single_mode, the unique file logger can only be invoked using macros like LOGIT_TRACE_TO . This version uses new and std::unique_ptr for C++11 compatibility. |
Definition at line 865 of file LogMacros.hpp.
#define LOGIT_DEBUG | ( | ... | ) |
Definition at line 220 of file LogMacros.hpp.
#define LOGIT_DEBUG0 | ( | ) |
Definition at line 221 of file LogMacros.hpp.
#define LOGIT_DEBUG0_IF | ( | condition | ) |
Definition at line 328 of file LogMacros.hpp.
#define LOGIT_DEBUG0_TO | ( | index | ) |
Definition at line 231 of file LogMacros.hpp.
#define LOGIT_DEBUG_IF | ( | condition, | |
... ) |
Definition at line 327 of file LogMacros.hpp.
#define LOGIT_DEBUG_TO | ( | index, | |
... ) |
Definition at line 230 of file LogMacros.hpp.
#define LOGIT_ENUM_TO_STR_CASE | ( | value | ) |
Definition at line 53 of file LogMacros.hpp.
#define LOGIT_ERROR | ( | ... | ) |
Definition at line 260 of file LogMacros.hpp.
#define LOGIT_ERROR0 | ( | ) |
Definition at line 261 of file LogMacros.hpp.
#define LOGIT_ERROR0_IF | ( | condition | ) |
Definition at line 348 of file LogMacros.hpp.
#define LOGIT_ERROR0_TO | ( | index | ) |
Definition at line 271 of file LogMacros.hpp.
#define LOGIT_ERROR_IF | ( | condition, | |
... ) |
Definition at line 347 of file LogMacros.hpp.
#define LOGIT_ERROR_TO | ( | index, | |
... ) |
Definition at line 270 of file LogMacros.hpp.
#define LOGIT_FATAL | ( | ... | ) |
Definition at line 280 of file LogMacros.hpp.
#define LOGIT_FATAL0 | ( | ) |
Definition at line 281 of file LogMacros.hpp.
#define LOGIT_FATAL0_IF | ( | condition | ) |
Definition at line 358 of file LogMacros.hpp.
#define LOGIT_FATAL0_TO | ( | index | ) |
Definition at line 291 of file LogMacros.hpp.
#define LOGIT_FATAL_IF | ( | condition, | |
... ) |
Definition at line 357 of file LogMacros.hpp.
#define LOGIT_FATAL_TO | ( | index, | |
... ) |
Definition at line 290 of file LogMacros.hpp.
#define LOGIT_FORMAT_DEBUG | ( | fmt, | |
... ) |
Definition at line 225 of file LogMacros.hpp.
#define LOGIT_FORMAT_DEBUG_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 332 of file LogMacros.hpp.
#define LOGIT_FORMAT_DEBUG_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 235 of file LogMacros.hpp.
#define LOGIT_FORMAT_ERROR | ( | fmt, | |
... ) |
Definition at line 265 of file LogMacros.hpp.
#define LOGIT_FORMAT_ERROR_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 352 of file LogMacros.hpp.
#define LOGIT_FORMAT_ERROR_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 275 of file LogMacros.hpp.
#define LOGIT_FORMAT_FATAL | ( | fmt, | |
... ) |
Definition at line 285 of file LogMacros.hpp.
#define LOGIT_FORMAT_FATAL_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 362 of file LogMacros.hpp.
#define LOGIT_FORMAT_FATAL_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 295 of file LogMacros.hpp.
#define LOGIT_FORMAT_INFO | ( | fmt, | |
... ) |
Definition at line 205 of file LogMacros.hpp.
#define LOGIT_FORMAT_INFO_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 322 of file LogMacros.hpp.
#define LOGIT_FORMAT_INFO_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 215 of file LogMacros.hpp.
#define LOGIT_FORMAT_TRACE | ( | fmt, | |
... ) |
Definition at line 185 of file LogMacros.hpp.
#define LOGIT_FORMAT_TRACE_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 312 of file LogMacros.hpp.
#define LOGIT_FORMAT_TRACE_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 195 of file LogMacros.hpp.
#define LOGIT_FORMAT_WARN | ( | fmt, | |
... ) |
Definition at line 245 of file LogMacros.hpp.
#define LOGIT_FORMAT_WARN_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 342 of file LogMacros.hpp.
#define LOGIT_FORMAT_WARN_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 255 of file LogMacros.hpp.
#define LOGIT_FUNCTION __func__ |
Definition at line 50 of file LogMacros.hpp.
#define LOGIT_GET_FLOAT_PARAM | ( | logger_index, | |
param ) |
Macro for retrieving a floating-point parameter from a logger.
logger_index | The index of the logger. |
param | The logger parameter to retrieve. |
Definition at line 922 of file LogMacros.hpp.
#define LOGIT_GET_INT_PARAM | ( | logger_index, | |
param ) |
Macro for retrieving an integer parameter from a logger.
logger_index | The index of the logger. |
param | The logger parameter to retrieve. |
Definition at line 915 of file LogMacros.hpp.
#define LOGIT_GET_LAST_FILE_NAME | ( | logger_index | ) |
Macro for retrieving the last log file name from a specific logger.
logger_index | The index of the logger. |
Definition at line 928 of file LogMacros.hpp.
#define LOGIT_GET_LAST_FILE_PATH | ( | logger_index | ) |
Macro for retrieving the last log file path from a specific logger.
logger_index | The index of the logger. |
Definition at line 934 of file LogMacros.hpp.
#define LOGIT_GET_LAST_LOG_TIMESTAMP | ( | logger_index | ) |
Macro for retrieving the timestamp of the last log from a specific logger.
logger_index | The index of the logger. |
Definition at line 940 of file LogMacros.hpp.
#define LOGIT_GET_STRING_PARAM | ( | logger_index, | |
param ) |
Macro for retrieving a string parameter from a logger.
logger_index | The index of the logger. |
param | The logger parameter to retrieve. |
Definition at line 908 of file LogMacros.hpp.
#define LOGIT_GET_TIME_SINCE_LAST_LOG | ( | logger_index | ) |
Macro for retrieving the time since the last log from a specific logger.
logger_index | The index of the logger. |
Definition at line 946 of file LogMacros.hpp.
#define LOGIT_INFO | ( | ... | ) |
Definition at line 200 of file LogMacros.hpp.
#define LOGIT_INFO0 | ( | ) |
Definition at line 201 of file LogMacros.hpp.
#define LOGIT_INFO0_IF | ( | condition | ) |
Definition at line 318 of file LogMacros.hpp.
#define LOGIT_INFO0_TO | ( | index | ) |
Definition at line 211 of file LogMacros.hpp.
#define LOGIT_INFO_IF | ( | condition, | |
... ) |
Definition at line 317 of file LogMacros.hpp.
#define LOGIT_INFO_TO | ( | index, | |
... ) |
Definition at line 210 of file LogMacros.hpp.
#define LOGIT_IS_LOGGER_ENABLED | ( | logger_index | ) |
Checks whether a logger is enabled.
logger_index | The index of the logger. |
Definition at line 958 of file LogMacros.hpp.
#define LOGIT_IS_SINGLE_MODE | ( | logger_index | ) |
Checks whether a logger is in single mode.
logger_index | The index of the logger. |
Definition at line 970 of file LogMacros.hpp.
#define LOGIT_LOG_AND_RETURN | ( | level, | |
format, | |||
arg_names, | |||
... ) |
Logs a message with arguments.
level | The log level. |
format | The log message format. |
arg_names | The names of the arguments. |
... | The arguments to log. |
Definition at line 135 of file LogMacros.hpp.
#define LOGIT_LOG_AND_RETURN_NOARGS | ( | level, | |
format ) |
Logs a message without arguments.
level | The log level. |
format | The log message format. |
Definition at line 111 of file LogMacros.hpp.
#define LOGIT_LOG_AND_RETURN_NOARGS_WITH_INDEX | ( | level, | |
index, | |||
format ) |
Logs a message to a specific logger without arguments.
level | The log level. |
index | The index of the logger to log to. |
format | The log message format. |
Definition at line 121 of file LogMacros.hpp.
#define LOGIT_LOG_AND_RETURN_PRINT | ( | level, | |
arg_names, | |||
... ) |
Logs a message with arguments, but prints them without using a format string.
level | The log level. |
arg_names | The names of the arguments. |
... | The arguments to log. |
This macro logs the raw arguments without applying any formatting to them.
Definition at line 146 of file LogMacros.hpp.
#define LOGIT_LOG_AND_RETURN_PRINT_WITH_INDEX | ( | level, | |
index, | |||
arg_names, | |||
... ) |
Logs a message with arguments to a specific logger, but prints them without using a format string.
level | The log level. |
index | The index of the logger to log to. |
arg_names | The names of the arguments. |
... | The arguments to log. |
This macro logs the raw arguments without applying any formatting to them to a specific logger.
Definition at line 170 of file LogMacros.hpp.
#define LOGIT_LOG_AND_RETURN_WITH_INDEX | ( | level, | |
index, | |||
format, | |||
arg_names, | |||
... ) |
Logs a message with arguments to a specific logger.
level | The log level. |
index | The index of the logger to log to. |
format | The log message format. |
arg_names | The names of the arguments. |
... | The arguments to log. |
Definition at line 158 of file LogMacros.hpp.
#define LOGIT_NOARGS_DEBUG | ( | ) |
Definition at line 224 of file LogMacros.hpp.
#define LOGIT_NOARGS_DEBUG_IF | ( | condition | ) |
Definition at line 331 of file LogMacros.hpp.
#define LOGIT_NOARGS_DEBUG_TO | ( | index | ) |
Definition at line 234 of file LogMacros.hpp.
#define LOGIT_NOARGS_ERROR | ( | ) |
Definition at line 264 of file LogMacros.hpp.
#define LOGIT_NOARGS_ERROR_IF | ( | condition | ) |
Definition at line 351 of file LogMacros.hpp.
#define LOGIT_NOARGS_ERROR_TO | ( | index | ) |
Definition at line 274 of file LogMacros.hpp.
#define LOGIT_NOARGS_FATAL | ( | ) |
Definition at line 284 of file LogMacros.hpp.
#define LOGIT_NOARGS_FATAL_IF | ( | condition | ) |
Definition at line 361 of file LogMacros.hpp.
#define LOGIT_NOARGS_FATAL_TO | ( | index | ) |
Definition at line 294 of file LogMacros.hpp.
#define LOGIT_NOARGS_INFO | ( | ) |
Definition at line 204 of file LogMacros.hpp.
#define LOGIT_NOARGS_INFO_IF | ( | condition | ) |
Definition at line 321 of file LogMacros.hpp.
#define LOGIT_NOARGS_INFO_TO | ( | index | ) |
Definition at line 214 of file LogMacros.hpp.
#define LOGIT_NOARGS_TRACE | ( | ) |
Definition at line 184 of file LogMacros.hpp.
#define LOGIT_NOARGS_TRACE_IF | ( | condition | ) |
Definition at line 311 of file LogMacros.hpp.
#define LOGIT_NOARGS_TRACE_TO | ( | index | ) |
Definition at line 194 of file LogMacros.hpp.
#define LOGIT_NOARGS_WARN | ( | ) |
Definition at line 244 of file LogMacros.hpp.
#define LOGIT_NOARGS_WARN_IF | ( | condition | ) |
Definition at line 341 of file LogMacros.hpp.
#define LOGIT_NOARGS_WARN_TO | ( | index | ) |
Definition at line 254 of file LogMacros.hpp.
#define LOGIT_PRINT_DEBUG | ( | ... | ) |
Definition at line 226 of file LogMacros.hpp.
#define LOGIT_PRINT_DEBUG_IF | ( | condition, | |
fmt ) |
Definition at line 333 of file LogMacros.hpp.
#define LOGIT_PRINT_DEBUG_TO | ( | index, | |
... ) |
Definition at line 236 of file LogMacros.hpp.
#define LOGIT_PRINT_ERROR | ( | ... | ) |
Definition at line 266 of file LogMacros.hpp.
#define LOGIT_PRINT_ERROR_IF | ( | condition, | |
fmt ) |
Definition at line 353 of file LogMacros.hpp.
#define LOGIT_PRINT_ERROR_TO | ( | index, | |
... ) |
Definition at line 276 of file LogMacros.hpp.
#define LOGIT_PRINT_FATAL | ( | ... | ) |
Definition at line 286 of file LogMacros.hpp.
#define LOGIT_PRINT_FATAL_IF | ( | condition, | |
fmt ) |
Definition at line 363 of file LogMacros.hpp.
#define LOGIT_PRINT_FATAL_TO | ( | index, | |
... ) |
Definition at line 296 of file LogMacros.hpp.
#define LOGIT_PRINT_INFO | ( | ... | ) |
Definition at line 206 of file LogMacros.hpp.
#define LOGIT_PRINT_INFO_IF | ( | condition, | |
fmt ) |
Definition at line 323 of file LogMacros.hpp.
#define LOGIT_PRINT_INFO_TO | ( | index, | |
... ) |
Definition at line 216 of file LogMacros.hpp.
#define LOGIT_PRINT_TRACE | ( | ... | ) |
Definition at line 186 of file LogMacros.hpp.
#define LOGIT_PRINT_TRACE_IF | ( | condition, | |
fmt ) |
Definition at line 313 of file LogMacros.hpp.
#define LOGIT_PRINT_TRACE_TO | ( | index, | |
... ) |
Definition at line 196 of file LogMacros.hpp.
#define LOGIT_PRINT_WARN | ( | ... | ) |
Definition at line 246 of file LogMacros.hpp.
#define LOGIT_PRINT_WARN_IF | ( | condition, | |
fmt ) |
Definition at line 343 of file LogMacros.hpp.
#define LOGIT_PRINT_WARN_TO | ( | index, | |
... ) |
Definition at line 256 of file LogMacros.hpp.
#define LOGIT_PRINTF_DEBUG | ( | fmt, | |
... ) |
Definition at line 227 of file LogMacros.hpp.
#define LOGIT_PRINTF_DEBUG_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 334 of file LogMacros.hpp.
#define LOGIT_PRINTF_DEBUG_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 237 of file LogMacros.hpp.
#define LOGIT_PRINTF_ERROR | ( | fmt, | |
... ) |
Definition at line 267 of file LogMacros.hpp.
#define LOGIT_PRINTF_ERROR_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 354 of file LogMacros.hpp.
#define LOGIT_PRINTF_ERROR_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 277 of file LogMacros.hpp.
#define LOGIT_PRINTF_FATAL | ( | fmt, | |
... ) |
Definition at line 287 of file LogMacros.hpp.
#define LOGIT_PRINTF_FATAL_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 364 of file LogMacros.hpp.
#define LOGIT_PRINTF_FATAL_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 297 of file LogMacros.hpp.
#define LOGIT_PRINTF_INFO | ( | fmt, | |
... ) |
Definition at line 207 of file LogMacros.hpp.
#define LOGIT_PRINTF_INFO_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 324 of file LogMacros.hpp.
#define LOGIT_PRINTF_INFO_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 217 of file LogMacros.hpp.
#define LOGIT_PRINTF_TRACE | ( | fmt, | |
... ) |
Definition at line 187 of file LogMacros.hpp.
#define LOGIT_PRINTF_TRACE_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 314 of file LogMacros.hpp.
#define LOGIT_PRINTF_TRACE_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 197 of file LogMacros.hpp.
#define LOGIT_PRINTF_WARN | ( | fmt, | |
... ) |
Definition at line 247 of file LogMacros.hpp.
#define LOGIT_PRINTF_WARN_IF | ( | condition, | |
fmt, | |||
... ) |
Definition at line 344 of file LogMacros.hpp.
#define LOGIT_PRINTF_WARN_TO | ( | index, | |
fmt, | |||
... ) |
Definition at line 257 of file LogMacros.hpp.
#define LOGIT_SET_LOGGER_ENABLED | ( | logger_index, | |
enabled ) |
Enables or disables a logger by index.
logger_index | The index of the logger. |
enabled | True to enable the logger, false to disable it. |
Definition at line 952 of file LogMacros.hpp.
#define LOGIT_SET_SINGLE_MODE | ( | logger_index, | |
single_mode ) |
Sets the single-mode flag for a logger.
logger_index | The index of the logger. |
single_mode | True to set the logger to single mode, false otherwise. |
Definition at line 964 of file LogMacros.hpp.
#define LOGIT_STREAM | ( | level | ) |
Begin a log stream for the specified log level.
Definition at line 63 of file LogMacros.hpp.
#define LOGIT_STREAM_DEBUG | ( | ) |
Definition at line 71 of file LogMacros.hpp.
#define LOGIT_STREAM_DEBUG_TO | ( | index | ) |
Definition at line 78 of file LogMacros.hpp.
#define LOGIT_STREAM_ERROR | ( | ) |
Definition at line 74 of file LogMacros.hpp.
#define LOGIT_STREAM_ERROR_TO | ( | index | ) |
Definition at line 81 of file LogMacros.hpp.
#define LOGIT_STREAM_FATAL | ( | ) |
Definition at line 75 of file LogMacros.hpp.
#define LOGIT_STREAM_FATAL_TO | ( | index | ) |
Definition at line 82 of file LogMacros.hpp.
#define LOGIT_STREAM_INFO | ( | ) |
Definition at line 72 of file LogMacros.hpp.
#define LOGIT_STREAM_INFO_TO | ( | index | ) |
Definition at line 79 of file LogMacros.hpp.
#define LOGIT_STREAM_TRACE | ( | ) |
Definition at line 70 of file LogMacros.hpp.
#define LOGIT_STREAM_TRACE_TO | ( | index | ) |
Definition at line 77 of file LogMacros.hpp.
#define LOGIT_STREAM_WARN | ( | ) |
Definition at line 73 of file LogMacros.hpp.
#define LOGIT_STREAM_WARN_TO | ( | index | ) |
Definition at line 80 of file LogMacros.hpp.
#define LOGIT_STREAM_WITH_INDEX | ( | level, | |
index ) |
Begin a log stream for the specified log level, targeting a specific logger.
Definition at line 67 of file LogMacros.hpp.
#define LOGIT_TRACE | ( | ... | ) |
Definition at line 180 of file LogMacros.hpp.
#define LOGIT_TRACE0 | ( | ) |
Definition at line 181 of file LogMacros.hpp.
#define LOGIT_TRACE0_IF | ( | condition | ) |
Definition at line 308 of file LogMacros.hpp.
#define LOGIT_TRACE0_TO | ( | index | ) |
Definition at line 191 of file LogMacros.hpp.
#define LOGIT_TRACE_IF | ( | condition, | |
... ) |
Definition at line 307 of file LogMacros.hpp.
#define LOGIT_TRACE_TO | ( | index, | |
... ) |
Definition at line 190 of file LogMacros.hpp.
#define LOGIT_WAIT | ( | ) |
Macro for waiting for all asynchronous loggers to finish processing.
Definition at line 976 of file LogMacros.hpp.
#define LOGIT_WARN | ( | ... | ) |
Definition at line 240 of file LogMacros.hpp.
#define LOGIT_WARN0 | ( | ) |
Definition at line 241 of file LogMacros.hpp.
#define LOGIT_WARN0_IF | ( | condition | ) |
Definition at line 338 of file LogMacros.hpp.
#define LOGIT_WARN0_TO | ( | index | ) |
Definition at line 251 of file LogMacros.hpp.
#define LOGIT_WARN_IF | ( | condition, | |
... ) |
Definition at line 337 of file LogMacros.hpp.
#define LOGIT_WARN_TO | ( | index, | |
... ) |
Definition at line 250 of file LogMacros.hpp.