LogIt++
Header-only, macro-first C++ logging library
Loading...
Searching...
No Matches
log_macros.hpp File Reference

Provides various logging macros for different log levels and options. More...

#include "config.hpp"
#include "utils.hpp"
#include "Logger.hpp"
#include "detail/LogStream.hpp"
#include "detail/ScopeTimer.hpp"
#include "detail/system_error_macros.hpp"

Go to the source code of this file.

Macros

#define LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_LOG_MACROS_HPP_INCLUDED
 
#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_LOG_AND_RETURN_FMT(level, format, arg_names, ...)
 
#define LOGIT_LOG_AND_RETURN_FMT_WITH_INDEX(level, index, format, arg_names, ...)
 
#define LOGIT_RAW(message)
 Logs an already formatted raw message without applying logger formatter patterns or level filters.
 
#define LOGIT_RAW_TO(index, message)
 Logs an already formatted raw message to a specific logger.
 
#define LOGIT_RAW_IF(condition, message)
 Logs a raw message when the condition is true.
 
#define LOGIT_SECTION(name)
 Logs a raw section header in [name] form.
 
#define LOGIT_SECTION_TO(index, name)
 Logs a raw section header to a specific logger.
 
#define LOGIT_SECTION_IF(condition, name)
 Logs a raw section header when the condition is true.
 
#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 LOGITF_TRACE(fmt_str, ...)
 
#define LOGIT_FMT_TRACE(fmt_str, ...)
 
#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 LOGITF_TRACE_TO(index, fmt_str, ...)
 
#define LOGIT_FMT_TRACE_TO(index, fmt_str, ...)
 
#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 LOGITF_INFO(fmt_str, ...)
 
#define LOGIT_FMT_INFO(fmt_str, ...)
 
#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 LOGITF_INFO_TO(index, fmt_str, ...)
 
#define LOGIT_FMT_INFO_TO(index, fmt_str, ...)
 
#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 LOGITF_DEBUG(fmt_str, ...)
 
#define LOGIT_FMT_DEBUG(fmt_str, ...)
 
#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 LOGITF_DEBUG_TO(index, fmt_str, ...)
 
#define LOGIT_FMT_DEBUG_TO(index, fmt_str, ...)
 
#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 LOGITF_WARN(fmt_str, ...)
 
#define LOGIT_FMT_WARN(fmt_str, ...)
 
#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 LOGITF_WARN_TO(index, fmt_str, ...)
 
#define LOGIT_FMT_WARN_TO(index, fmt_str, ...)
 
#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 LOGITF_ERROR(fmt_str, ...)
 
#define LOGIT_FMT_ERROR(fmt_str, ...)
 
#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 LOGITF_ERROR_TO(index, fmt_str, ...)
 
#define LOGIT_FMT_ERROR_TO(index, fmt_str, ...)
 
#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 LOGITF_FATAL(fmt_str, ...)
 
#define LOGIT_FMT_FATAL(fmt_str, ...)
 
#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 LOGITF_FATAL_TO(index, fmt_str, ...)
 
#define LOGIT_FMT_FATAL_TO(index, fmt_str, ...)
 
#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_CONFIG(config, pattern)
 Add a console logger from an explicit ConsoleLogger::Config.
 
#define LOGIT_ADD_CONSOLE_CONFIG_SINGLE_MODE(config, pattern)
 Add a console logger from an explicit ConsoleLogger::Config in single_mode.
 
#define LOGIT_ADD_CONSOLE_EX(pattern, async, use_dedicated_executor, queue_capacity, queue_policy)
 Add a console logger with explicit async executor settings.
 
#define LOGIT_ADD_CONSOLE_EX_SINGLE_MODE(pattern, async, use_dedicated_executor, queue_capacity, queue_policy)
 Add a console logger with explicit async executor settings in single_mode.
 
#define LOGIT_ADD_CONSOLE_DEDICATED(pattern, queue_capacity, queue_policy)
 Add an async console logger backed by a dedicated executor.
 
#define LOGIT_ADD_CONSOLE_DEDICATED_SINGLE_MODE(pattern, queue_capacity, queue_policy)
 Add an async console logger backed by a dedicated executor in single_mode.
 
#define LOGIT_ADD_CONSOLE_STREAM(stream, pattern, async)
 Add a console logger writing to a caller-provided std::ostream& (e.g.
 
#define LOGIT_ADD_CONSOLE_STREAM_SINGLE_MODE(stream, pattern, async)
 Add a console logger writing to a caller-provided std::ostream& in single_mode.
 
#define LOGIT_ADD_CONSOLE_STREAM_EX(stream, config, pattern)
 Add a console logger from an explicit Config writing to a caller-provided std::ostream&.
 
#define LOGIT_ADD_CONSOLE_STREAM_EX_SINGLE_MODE(stream, config, pattern)
 Add a console logger from an explicit Config writing to a caller-provided std::ostream& in single_mode.
 
#define LOGIT_ADD_CONSOLE_DEFAULT()
 Macro for adding the default console logger.
 
#define LOGIT_ADD_CONSOLE_DEFAULT_SINGLE_MODE()
 Macro for adding the default console logger in single_mode.
 
#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_CONFIG(config, pattern)
 Add a file logger from an explicit FileLogger::Config.
 
#define LOGIT_ADD_FILE_LOGGER_CONFIG_SINGLE_MODE(config, pattern)
 Add a file logger from an explicit FileLogger::Config in single_mode.
 
#define LOGIT_ADD_FILE_LOGGER_EX(directory, async, auto_delete_days, pattern, use_dedicated_executor, queue_capacity, queue_policy)
 Add a file logger with explicit async executor settings.
 
#define LOGIT_ADD_FILE_LOGGER_EX_SINGLE_MODE(directory, async, auto_delete_days, pattern, use_dedicated_executor, queue_capacity, queue_policy)
 Add a file logger with explicit async executor settings in single_mode.
 
#define LOGIT_ADD_FILE_LOGGER_DEDICATED(directory, auto_delete_days, pattern, queue_capacity, queue_policy)
 Add an async file logger backed by a dedicated executor.
 
#define LOGIT_ADD_FILE_LOGGER_DEDICATED_SINGLE_MODE(directory, auto_delete_days, pattern, queue_capacity, queue_policy)
 Add an async file logger backed by a dedicated executor in single_mode.
 
#define LOGIT_ADD_FILE_LOGGER_DEFAULT()
 Macro for adding the default file logger.
 
#define LOGIT_ADD_FILE_LOGGER_DEFAULT_SINGLE_MODE()
 Macro for adding the default file logger in single_mode.
 
#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION(dir, async, days, pattern, max_bytes, max_files)
 
#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_SINGLE_MODE(dir, async, days, pattern, max_bytes, max_files)
 
#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX(dir, async, days, pattern, max_bytes, max_files, use_dedicated_executor, queue_capacity, queue_policy)
 
#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX_SINGLE_MODE(dir, async, days, pattern, max_bytes, max_files, use_dedicated_executor, queue_capacity, queue_policy)
 
#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_DEDICATED(dir, days, pattern, max_bytes, max_files, queue_capacity, queue_policy)
 
#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_DEDICATED_SINGLE_MODE(dir, days, pattern, max_bytes, max_files, queue_capacity, queue_policy)
 
#define LOGIT_ADD_FILE_LOGGER_DEFAULT_WITH_ROTATION()
 
#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_CONFIG(config, pattern)
 Add a unique file logger from an explicit UniqueFileLogger::Config.
 
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_CONFIG_SINGLE_MODE(config, pattern)
 Add a unique file logger from an explicit UniqueFileLogger::Config in single_mode.
 
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_EX(directory, async, auto_delete_days, hash_length, pattern, use_dedicated_executor, queue_capacity, queue_policy)
 Add a unique file logger with explicit async executor settings.
 
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_EX_SINGLE_MODE(directory, async, auto_delete_days, hash_length, pattern, use_dedicated_executor, queue_capacity, queue_policy)
 Add a unique file logger with explicit async executor settings in single_mode.
 
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEDICATED(directory, auto_delete_days, hash_length, pattern, queue_capacity, queue_policy)
 Add an async unique file logger backed by a dedicated executor.
 
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEDICATED_SINGLE_MODE(directory, auto_delete_days, hash_length, pattern, queue_capacity, queue_policy)
 Add an async unique file logger backed by a dedicated executor in single_mode.
 
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT()
 Macro for adding the default unique file logger.
 
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT_SINGLE_MODE()
 Macro for adding the default unique file logger in single_mode.
 
#define LOGIT_ADD_CRASH_LOGGER(path, buffer_size)
 Macro for adding a crash logger with custom configuration.
 
#define LOGIT_ADD_CRASH_LOGGER_SINGLE_MODE(path, buffer_size)
 Macro for adding a crash logger with custom configuration in single_mode.
 
#define LOGIT_ADD_CRASH_LOGGER_DEFAULT()
 Macro for adding a crash logger with default configuration.
 
#define LOGIT_ADD_MEMORY_LOGGER(max_records, max_bytes, max_age_ms)
 Macro for adding an in-memory logger with explicit limits.
 
#define LOGIT_ADD_MEMORY_LOGGER_SINGLE_MODE(max_records, max_bytes, max_age_ms)
 Macro for adding an in-memory logger in single_mode with explicit limits.
 
#define LOGIT_ADD_MEMORY_LOGGER_DEFAULT()
 Macro for adding an in-memory logger with default retention settings.
 
#define LOGIT_ADD_MEMORY_LOGGER_DEFAULT_SINGLE_MODE()
 Macro for adding an in-memory logger in single_mode with default retention settings.
 
#define LOGIT_ADD_WINDOWS_DEBUG(async)
 Macro for adding a Windows debug logger.
 
#define LOGIT_ADD_WINDOWS_DEBUG_SINGLE_MODE(async)
 Macro for adding a Windows debug logger in single_mode.
 
#define LOGIT_ADD_WINDOWS_DEBUG_CONFIG(config)
 Add a Windows debug logger from an explicit WindowsDebugLogger::Config.
 
#define LOGIT_ADD_WINDOWS_DEBUG_CONFIG_SINGLE_MODE(config)
 Add a Windows debug logger from an explicit WindowsDebugLogger::Config in single_mode.
 
#define LOGIT_ADD_WINDOWS_DEBUG_EX(async, use_dedicated_executor, queue_capacity, queue_policy)
 Add a Windows debug logger with explicit async executor settings.
 
#define LOGIT_ADD_WINDOWS_DEBUG_EX_SINGLE_MODE(async, use_dedicated_executor, queue_capacity, queue_policy)
 Add a Windows debug logger with explicit async executor settings in single_mode.
 
#define LOGIT_ADD_WINDOWS_DEBUG_DEDICATED(queue_capacity, queue_policy)
 Add an async Windows debug logger backed by a dedicated executor.
 
#define LOGIT_ADD_WINDOWS_DEBUG_DEDICATED_SINGLE_MODE(queue_capacity, queue_policy)
 Add an async Windows debug logger backed by a dedicated executor in single_mode.
 
#define LOGIT_ADD_WINDOWS_DEBUG_DEFAULT()
 Macro for adding a Windows debug logger with default settings.
 
#define LOGIT_ADD_SYSLOG(ident, facility, async)
 Macro for adding a syslog logger with custom configuration.
 
#define LOGIT_ADD_SYSLOG_SINGLE_MODE(ident, facility, async)
 Macro for adding a syslog logger with custom configuration in single_mode.
 
#define LOGIT_ADD_SYSLOG_CONFIG(config)
 Add a syslog logger from an explicit SyslogLogger::Config.
 
#define LOGIT_ADD_SYSLOG_CONFIG_SINGLE_MODE(config)
 Add a syslog logger from an explicit SyslogLogger::Config in single_mode.
 
#define LOGIT_ADD_SYSLOG_EX(ident, facility, async, use_dedicated_executor, queue_capacity, queue_policy)
 Add a syslog logger with explicit async executor settings.
 
#define LOGIT_ADD_SYSLOG_EX_SINGLE_MODE(ident, facility, async, use_dedicated_executor, queue_capacity, queue_policy)
 Add a syslog logger with explicit async executor settings in single_mode.
 
#define LOGIT_ADD_SYSLOG_DEDICATED(ident, facility, queue_capacity, queue_policy)
 Add an async syslog logger backed by a dedicated executor.
 
#define LOGIT_ADD_SYSLOG_DEDICATED_SINGLE_MODE(ident, facility, queue_capacity, queue_policy)
 Add an async syslog logger backed by a dedicated executor in single_mode.
 
#define LOGIT_ADD_SYSLOG_DEFAULT()
 Macro for adding a syslog logger with default configuration.
 
#define LOGIT_ADD_EVENT_LOG(source_wide, async)
 Macro for adding a Windows Event Log logger with custom configuration.
 
#define LOGIT_ADD_EVENT_LOG_SINGLE_MODE(source_wide, async)
 Macro for adding a Windows Event Log logger with custom configuration in single_mode.
 
#define LOGIT_ADD_EVENT_LOG_CONFIG(config)
 Add a Windows Event Log logger from an explicit EventLogLogger::Config.
 
#define LOGIT_ADD_EVENT_LOG_CONFIG_SINGLE_MODE(config)
 Add a Windows Event Log logger from an explicit EventLogLogger::Config in single_mode.
 
#define LOGIT_ADD_EVENT_LOG_EX(source_wide, async, use_dedicated_executor, queue_capacity, queue_policy)
 Add a Windows Event Log logger with explicit async executor settings.
 
#define LOGIT_ADD_EVENT_LOG_EX_SINGLE_MODE(source_wide, async, use_dedicated_executor, queue_capacity, queue_policy)
 Add a Windows Event Log logger with explicit async executor settings in single_mode.
 
#define LOGIT_ADD_EVENT_LOG_DEDICATED(source_wide, queue_capacity, queue_policy)
 Add an async Windows Event Log logger backed by a dedicated executor.
 
#define LOGIT_ADD_EVENT_LOG_DEDICATED_SINGLE_MODE(source_wide, queue_capacity, queue_policy)
 Add an async Windows Event Log logger backed by a dedicated executor in single_mode.
 
#define LOGIT_ADD_EVENT_LOG_DEFAULT()
 Macro for adding a Windows Event Log logger with default configuration.
 
#define LOGIT_WAIT()
 Macro for waiting for all asynchronous loggers to finish processing.
 
#define LOGIT_SHUTDOWN()
 Macro for shutting down logger system.
 
#define LOGIT_GET_LOGGER_AS(logger_index, logger_type)
 Retrieves a typed backend pointer from a logger by index.
 
#define LOGIT_WITH_LOGGER_AS(logger_index, logger_type, var_name)
 Executes a code block when the logger backend has the requested type.
 
#define LOGIT_GET_LOG_READER(logger_index)
 Retrieves a read-only log-reader interface from a logger by index.
 
#define LOGIT_WITH_LOG_READER(logger_index, var_name)
 Executes a code block when the logger backend supports ILogReader.
 
#define LOGIT_READ_RANGE(logger_index, from_ms, to_ms, limit)
 Reads a time-range of records from a backend that supports ILogReader.
 
#define LOGIT_READ_RECENT(logger_index, limit, period_ms, order)
 Reads recent records from a backend that supports ILogReader.
 
#define LOGIT_READ_RECENT_ASC(logger_index, limit, period_ms)
 Reads recent records in ascending order (oldest first).
 
#define LOGIT_READ_RECENT_DESC(logger_index, limit, period_ms)
 Reads recent records in descending order (newest first).
 
#define LOGIT_GET_LOG_SUBSCRIBER(logger_index)
 Retrieves a live-subscription interface from a logger by index.
 
#define LOGIT_WITH_LOG_SUBSCRIBER(logger_index, var_name)
 Executes a code block when the logger backend supports ILogSubscriber.
 
#define LOGIT_ADD_LOG_CALLBACK(logger_index, callback)
 Registers a callback to receive newly written log records.
 
#define LOGIT_REMOVE_LOG_CALLBACK(logger_index, callback_id)
 Unregisters a previously added log callback.
 
#define LOGIT_FUNCTION   __func__
 
#define LOGIT_ENUM_TO_STR_CASE(value)
 Expands to a case statement returning the stringified enum value.
 
#define LOGIT_LEVEL_TRACE   0
 
#define LOGIT_LEVEL_DEBUG   1
 
#define LOGIT_LEVEL_INFO   2
 
#define LOGIT_LEVEL_WARN   3
 
#define LOGIT_LEVEL_ERROR   4
 
#define LOGIT_LEVEL_FATAL   5
 
#define LOGIT_CONCAT_IMPL(x, y)
 Concatenate two tokens without macro expansion.
 
#define LOGIT_CONCAT(x, y)
 Concatenate two tokens with macro expansion.
 
#define LOGIT_MDC_PUT(key, value)
 
#define LOGIT_MDC_REMOVE(key)
 
#define LOGIT_MDC_CLEAR()
 
#define LOGIT_NDC_PUSH(value)
 
#define LOGIT_NDC_POP()
 
#define LOGIT_NDC_CLEAR()
 
#define LOGIT_NDC_GUARD(value)
 
#define LOGIT_COMPILED_LEVEL   LOGIT_LEVEL_TRACE
 
#define LOGIT_PERROR_TRACE(message)
 
#define LOGIT_PERROR_DEBUG(message)
 
#define LOGIT_PERROR_INFO(message)
 
#define LOGIT_PERROR_WARN(message)
 
#define LOGIT_PERROR_ERROR(message)
 
#define LOGIT_PERROR_FATAL(message)
 
#define LOGIT_WINERR_TRACE(message)
 
#define LOGIT_WINERR_DEBUG(message)
 
#define LOGIT_WINERR_INFO(message)
 
#define LOGIT_WINERR_WARN(message)
 
#define LOGIT_WINERR_ERROR(message)
 
#define LOGIT_WINERR_FATAL(message)
 
#define LOGIT_SYSERR_TRACE(message)
 
#define LOGIT_SYSERR_DEBUG(message)
 
#define LOGIT_SYSERR_INFO(message)
 
#define LOGIT_SYSERR_WARN(message)
 
#define LOGIT_SYSERR_ERROR(message)
 
#define LOGIT_SYSERR_FATAL(message)
 
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)
 
Scope-Based Timing

RAII timers that log the duration of a scope.

#define LOGIT_DETAIL_SCOPE(level, phase)
 
#define LOGIT_DETAIL_SCOPE_T(level, threshold_ms, phase)
 
#define LOGIT_DETAIL_SCOPE_PRINTF(level, fmt_str, ...)
 
#define LOGIT_DETAIL_SCOPE_PRINTF_T(level, threshold_ms, fmt_str, ...)
 
#define LOGIT_DETAIL_SCOPE_FMT(level, fmt_str, ...)
 
#define LOGIT_DETAIL_SCOPE_FMT_T(level, threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_TRACE(phase)
 
#define LOGIT_SCOPE_TRACE_T(threshold_ms, phase)
 
#define LOGIT_SCOPE_DEBUG(phase)
 
#define LOGIT_SCOPE_DEBUG_T(threshold_ms, phase)
 
#define LOGIT_SCOPE_INFO(phase)
 
#define LOGIT_SCOPE_INFO_T(threshold_ms, phase)
 
#define LOGIT_SCOPE_WARN(phase)
 
#define LOGIT_SCOPE_WARN_T(threshold_ms, phase)
 
#define LOGIT_SCOPE_ERROR(phase)
 
#define LOGIT_SCOPE_ERROR_T(threshold_ms, phase)
 
#define LOGIT_SCOPE_FATAL(phase)
 
#define LOGIT_SCOPE_FATAL_T(threshold_ms, phase)
 
#define LOGIT_SCOPE_PRINTF_TRACE(fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_TRACE_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_DEBUG(fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_DEBUG_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_INFO(fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_INFO_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_WARN(fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_WARN_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_ERROR(fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_ERROR_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_FATAL(fmt_str, ...)
 
#define LOGIT_SCOPE_PRINTF_FATAL_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_TRACE(fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_TRACE_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_DEBUG(fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_DEBUG_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_INFO(fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_INFO_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_WARN(fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_WARN_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_ERROR(fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_ERROR_T(threshold_ms, fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_FATAL(fmt_str, ...)
 
#define LOGIT_SCOPE_FMT_FATAL_T(threshold_ms, fmt_str, ...)
 
Conditional Logging

Macros for logging based on conditions.

#define LOGIT_DETAIL_CONDITIONAL_CALL(condition, expression)
 
#define LOGIT_DETAIL_CONDITIONAL(level, condition, ...)
 
#define LOGIT_DETAIL_CONDITIONAL_NOARGS(level, condition)
 
#define LOGIT_DETAIL_CONDITIONAL_FORMAT(level, condition, fmt, ...)
 
#define LOGIT_DETAIL_CONDITIONAL_PRINT(level, condition, ...)
 
#define LOGIT_DETAIL_CONDITIONAL_PRINTF(level, condition, fmt, ...)
 
#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, ...)
 
#define LOGIT_PRINTF_TRACE_IF(condition, fmt, ...)
 
#define LOGITF_TRACE_IF(condition, fmt_str, ...)
 
#define LOGIT_FMT_TRACE_IF(condition, fmt_str, ...)
 
#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, ...)
 
#define LOGIT_PRINTF_INFO_IF(condition, fmt, ...)
 
#define LOGITF_INFO_IF(condition, fmt_str, ...)
 
#define LOGIT_FMT_INFO_IF(condition, fmt_str, ...)
 
#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, ...)
 
#define LOGIT_PRINTF_DEBUG_IF(condition, fmt, ...)
 
#define LOGITF_DEBUG_IF(condition, fmt_str, ...)
 
#define LOGIT_FMT_DEBUG_IF(condition, fmt_str, ...)
 
#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, ...)
 
#define LOGIT_PRINTF_WARN_IF(condition, fmt, ...)
 
#define LOGITF_WARN_IF(condition, fmt_str, ...)
 
#define LOGIT_FMT_WARN_IF(condition, fmt_str, ...)
 
#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, ...)
 
#define LOGIT_PRINTF_ERROR_IF(condition, fmt, ...)
 
#define LOGITF_ERROR_IF(condition, fmt_str, ...)
 
#define LOGIT_FMT_ERROR_IF(condition, fmt_str, ...)
 
#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, ...)
 
#define LOGIT_PRINTF_FATAL_IF(condition, fmt, ...)
 
#define LOGITF_FATAL_IF(condition, fmt_str, ...)
 
#define LOGIT_FMT_FATAL_IF(condition, fmt_str, ...)
 
#define LOGIT_ONCE(level, ...)
 
#define LOGIT_EVERY_N(level, n, ...)
 
#define LOGIT_THROTTLE(level, period_ms, ...)
 
#define LOGIT_TRACE_ONCE(...)
 
#define LOGIT_DEBUG_ONCE(...)
 
#define LOGIT_INFO_ONCE(...)
 
#define LOGIT_WARN_ONCE(...)
 
#define LOGIT_ERROR_ONCE(...)
 
#define LOGIT_FATAL_ONCE(...)
 
#define LOGIT_TRACE_EVERY_N(n, ...)
 
#define LOGIT_DEBUG_EVERY_N(n, ...)
 
#define LOGIT_INFO_EVERY_N(n, ...)
 
#define LOGIT_WARN_EVERY_N(n, ...)
 
#define LOGIT_ERROR_EVERY_N(n, ...)
 
#define LOGIT_FATAL_EVERY_N(n, ...)
 
#define LOGIT_TRACE_THROTTLE(p, ...)
 
#define LOGIT_DEBUG_THROTTLE(p, ...)
 
#define LOGIT_INFO_THROTTLE(p, ...)
 
#define LOGIT_WARN_THROTTLE(p, ...)
 
#define LOGIT_ERROR_THROTTLE(p, ...)
 
#define LOGIT_FATAL_THROTTLE(p, ...)
 
#define LOGIT_TAG(k, v)
 
#define LOGIT_TRACE_TAG(msg, ...)
 
#define LOGIT_DEBUG_TAG(msg, ...)
 
#define LOGIT_INFO_TAG(msg, ...)
 
#define LOGIT_WARN_TAG(msg, ...)
 
#define LOGIT_ERROR_TAG(msg, ...)
 
#define LOGIT_FATAL_TAG(msg, ...)
 
Logger Management

Macros for managing loggers.

#define LOGIT_GET_STRING_PARAM(logger_index, param)
 Retrieves string parameter from a logger.
 
#define LOGIT_GET_INT_PARAM(logger_index, param)
 Retrieves integer parameter from a logger.
 
#define LOGIT_GET_FLOAT_PARAM(logger_index, param)
 Retrieves floating-point parameter from a logger.
 
#define LOGIT_GET_LAST_FILE_NAME(logger_index)
 Retrieves last log file name from a specific logger.
 
#define LOGIT_GET_LAST_FILE_PATH(logger_index)
 Retrieves last log file path from a specific logger.
 
#define LOGIT_GET_LAST_LOG_TIMESTAMP(logger_index)
 Retrieves timestamp of last log from a specific logger.
 
#define LOGIT_GET_TIME_SINCE_LAST_LOG(logger_index)
 Retrieves time since last log from a specific logger.
 
#define LOGIT_GET_BUFFERED_STRINGS(logger_index)
 Retrieves buffered formatted messages from a specific logger.
 
#define LOGIT_GET_BUFFERED_ENTRIES(logger_index)
 Retrieves buffered structured entries from a specific logger.
 
#define LOGIT_LIST_LOG_FILES(logger_index)
 Lists persisted log files for a specific file-based logger.
 
#define LOGIT_READ_LOG_FILE(logger_index, path)
 Reads one persisted log file from a specific file-based logger.
 
#define LOGIT_READ_LOG_FILES(logger_index, paths)
 Reads several persisted log files from a specific file-based logger.
 
#define LOGIT_CLEAR_LOGGER(logger_index)
 Clears logger-owned records for a specific logger.
 
#define LOGIT_CLEAR_LOGGER_EX(logger_index, options)
 Clears logger-owned records for a specific logger with options.
 
#define LOGIT_CLEAR_ALL_LOGGERS()
 Clears logger-owned records for all registered loggers.
 
#define LOGIT_CLEAR_ALL_LOGGERS_EX(options)
 Clears logger-owned records for all registered loggers with options.
 
#define LOGIT_SET_LOGGER_ENABLED(logger_index, enabled)
 Enables or disables a logger.
 
#define LOGIT_IS_LOGGER_ENABLED(logger_index)
 Checks if a logger is enabled.
 
#define LOGIT_SET_SINGLE_MODE(logger_index, single_mode)
 Sets single mode for a specific logger.
 
#define LOGIT_SET_TIME_OFFSET(logger_index, offset_ms)
 Sets timestamp offset for a specific logger.
 
#define LOGIT_SET_LOG_LEVEL_TO(logger_index, level)
 Sets minimal log level for a specific logger.
 
#define LOGIT_SET_LOG_LEVEL(level)
 Sets minimal log level for all loggers.
 
#define LOGIT_GET_LOG_LEVEL(logger_index)
 Retrieves minimal log level for a specific logger.
 
#define LOGIT_IS_SINGLE_MODE(logger_index)
 Checks if a logger is in single mode.
 
Task Executor Configuration

Macros for configuring the TaskExecutor.

#define LOGIT_SET_MAX_QUEUE(size)
 Sets the maximum number of queued tasks.
 
#define LOGIT_QUEUE_DROP_NEWEST   logit::QueuePolicy::DropNewest
 Queue policy for dropping the newest task when the queue is full.
 
#define LOGIT_QUEUE_DROP_OLDEST   logit::QueuePolicy::DropOldest
 Queue policy for dropping the oldest task when the queue is full.
 
#define LOGIT_QUEUE_DROP   LOGIT_QUEUE_DROP_NEWEST
 Backward-compatible alias for dropping the newest task.
 
#define LOGIT_QUEUE_BLOCK   logit::QueuePolicy::Block
 Queue policy for blocking when the queue is full.
 
#define LOGIT_SET_QUEUE_POLICY(mode)
 Sets the behavior when the queue is full.
 
#define LOGIT_GET_DROPPED_TASKS()
 Returns the number of tasks dropped due to overflow.
 
#define LOGIT_RESET_DROPPED_TASKS()
 Resets the dropped-tasks counter to zero.
 

Detailed Description

Provides various logging macros for different log levels and options.

Definition in file log_macros.hpp.

Macro Definition Documentation

◆ LOGIT_0_DEBUG

#define LOGIT_0_DEBUG ( )
Value:
#define LOGIT_LOG_AND_RETURN_NOARGS(level, format)
Logs a message without arguments.
@ LOG_LVL_DEBUG
Debug level logging.

Definition at line 812 of file log_macros.hpp.

◆ LOGIT_0_DEBUG_IF

#define LOGIT_0_DEBUG_IF ( condition)
Value:
#define LOGIT_DETAIL_CONDITIONAL_NOARGS(level, condition)

Definition at line 1173 of file log_macros.hpp.

◆ LOGIT_0_DEBUG_TO

#define LOGIT_0_DEBUG_TO ( index)
Value:
#define LOGIT_LOG_AND_RETURN_NOARGS_WITH_INDEX(level, index, format)
Logs a message to a specific logger without arguments.

Definition at line 829 of file log_macros.hpp.

◆ LOGIT_0_ERROR

#define LOGIT_0_ERROR ( )
Value:

Definition at line 918 of file log_macros.hpp.

◆ LOGIT_0_ERROR_IF

#define LOGIT_0_ERROR_IF ( condition)

◆ LOGIT_0_ERROR_TO

#define LOGIT_0_ERROR_TO ( index)

◆ LOGIT_0_FATAL

#define LOGIT_0_FATAL ( )
Value:

Definition at line 971 of file log_macros.hpp.

◆ LOGIT_0_FATAL_IF

#define LOGIT_0_FATAL_IF ( condition)

◆ LOGIT_0_FATAL_TO

#define LOGIT_0_FATAL_TO ( index)

◆ LOGIT_0_INFO

#define LOGIT_0_INFO ( )
Value:

Definition at line 759 of file log_macros.hpp.

◆ LOGIT_0_INFO_IF

#define LOGIT_0_INFO_IF ( condition)
Value:

Definition at line 1124 of file log_macros.hpp.

◆ LOGIT_0_INFO_TO

#define LOGIT_0_INFO_TO ( index)

◆ LOGIT_0_TRACE

#define LOGIT_0_TRACE ( )
Value:

Definition at line 706 of file log_macros.hpp.

◆ LOGIT_0_TRACE_IF

#define LOGIT_0_TRACE_IF ( condition)

◆ LOGIT_0_TRACE_TO

#define LOGIT_0_TRACE_TO ( index)

◆ LOGIT_0_WARN

#define LOGIT_0_WARN ( )
Value:

Definition at line 865 of file log_macros.hpp.

◆ LOGIT_0_WARN_IF

#define LOGIT_0_WARN_IF ( condition)
Value:

Definition at line 1222 of file log_macros.hpp.

◆ LOGIT_0_WARN_TO

#define LOGIT_0_WARN_TO ( index)

◆ LOGIT_0DEBUG

#define LOGIT_0DEBUG ( )

◆ LOGIT_0DEBUG_IF

#define LOGIT_0DEBUG_IF ( condition)

◆ LOGIT_0DEBUG_TO

#define LOGIT_0DEBUG_TO ( index)

◆ LOGIT_0ERROR

#define LOGIT_0ERROR ( )

◆ LOGIT_0ERROR_IF

#define LOGIT_0ERROR_IF ( condition)

◆ LOGIT_0ERROR_TO

#define LOGIT_0ERROR_TO ( index)

◆ LOGIT_0FATAL

#define LOGIT_0FATAL ( )

◆ LOGIT_0FATAL_IF

#define LOGIT_0FATAL_IF ( condition)

◆ LOGIT_0FATAL_TO

#define LOGIT_0FATAL_TO ( index)

◆ LOGIT_0INFO

#define LOGIT_0INFO ( )

◆ LOGIT_0INFO_IF

#define LOGIT_0INFO_IF ( condition)
Value:

Definition at line 1122 of file log_macros.hpp.

◆ LOGIT_0INFO_TO

#define LOGIT_0INFO_TO ( index)

◆ LOGIT_0TRACE

#define LOGIT_0TRACE ( )

◆ LOGIT_0TRACE_IF

#define LOGIT_0TRACE_IF ( condition)

◆ LOGIT_0TRACE_TO

#define LOGIT_0TRACE_TO ( index)

◆ LOGIT_0WARN

#define LOGIT_0WARN ( )

◆ LOGIT_0WARN_IF

#define LOGIT_0WARN_IF ( condition)
Value:

Definition at line 1220 of file log_macros.hpp.

◆ LOGIT_0WARN_TO

#define LOGIT_0WARN_TO ( index)

◆ LOGIT_ADD_CONSOLE

#define LOGIT_ADD_CONSOLE ( pattern,
async )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger(async)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
false)
Outputs log messages to the console with optional ANSI color support.
void add_logger(std::unique_ptr< ILogger > logger, std::unique_ptr< ILogFormatter > formatter, bool single_mode=false)
Adds a logger and its corresponding formatter.
Definition Logger.hpp:64
static Logger & get_instance()
Retrieves singleton instance of Logger.
Definition Logger.hpp:53
A simple log formatter that formats log messages based on a user-defined pattern.

Macro for adding a console logger with a specific pattern and mode.

Parameters
patternThe format pattern for log messages.
asyncBoolean 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 2191 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_CONFIG

#define LOGIT_ADD_CONSOLE_CONFIG ( config,
pattern )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
false)

Add a console logger from an explicit ConsoleLogger::Config.

Definition at line 2209 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_CONFIG_SINGLE_MODE

#define LOGIT_ADD_CONSOLE_CONFIG_SINGLE_MODE ( config,
pattern )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Add a console logger from an explicit ConsoleLogger::Config in single_mode.

Definition at line 2216 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_DEDICATED

#define LOGIT_ADD_CONSOLE_DEDICATED ( pattern,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_CONSOLE_EX((pattern), true, true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_CONSOLE_EX(pattern, async, use_dedicated_executor, queue_capacity, queue_policy)
Add a console logger with explicit async executor settings.

Add an async console logger backed by a dedicated executor.

Definition at line 2239 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_DEDICATED_SINGLE_MODE

#define LOGIT_ADD_CONSOLE_DEDICATED_SINGLE_MODE ( pattern,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_CONSOLE_EX_SINGLE_MODE((pattern), true, true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_CONSOLE_EX_SINGLE_MODE(pattern, async, use_dedicated_executor, queue_capacity, queue_policy)
Add a console logger with explicit async executor settings in single_mode.

Add an async console logger backed by a dedicated executor in single_mode.

Definition at line 2243 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_DEFAULT

#define LOGIT_ADD_CONSOLE_DEFAULT ( )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger(true)), \
std::unique_ptr<logit::SimpleLogFormatter>( \
false)
#define LOGIT_CONSOLE_PATTERN
Defines the default log pattern for the console logger.
Definition config.hpp:96

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 2282 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_DEFAULT_SINGLE_MODE

#define LOGIT_ADD_CONSOLE_DEFAULT_SINGLE_MODE ( )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger(true)), \
std::unique_ptr<logit::SimpleLogFormatter>( \
true)

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 2292 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_EX

#define LOGIT_ADD_CONSOLE_EX ( pattern,
async,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger( \
(async), (use_dedicated_executor), (queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
false)

Add a console logger with explicit async executor settings.

Definition at line 2223 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_EX_SINGLE_MODE

#define LOGIT_ADD_CONSOLE_EX_SINGLE_MODE ( pattern,
async,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger( \
(async), (use_dedicated_executor), (queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Add a console logger with explicit async executor settings in single_mode.

Definition at line 2231 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_SINGLE_MODE

#define LOGIT_ADD_CONSOLE_SINGLE_MODE ( pattern,
async )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger(async)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Macro for adding a console logger in single_mode with a specific pattern and mode.

Parameters
patternThe format pattern for log messages.
asyncBoolean 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 2202 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_STREAM

#define LOGIT_ADD_CONSOLE_STREAM ( stream,
pattern,
async )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger( \
(stream), (async))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
false)

Add a console logger writing to a caller-provided std::ostream& (e.g.

std::cerr).

Parameters
streamOutput stream reference; lifetime is owned by the caller.

Definition at line 2248 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_STREAM_EX

#define LOGIT_ADD_CONSOLE_STREAM_EX ( stream,
config,
pattern )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger( \
(stream), (config))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
false)

Add a console logger from an explicit Config writing to a caller-provided std::ostream&.

Definition at line 2264 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_STREAM_EX_SINGLE_MODE

#define LOGIT_ADD_CONSOLE_STREAM_EX_SINGLE_MODE ( stream,
config,
pattern )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger( \
(stream), (config))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Add a console logger from an explicit Config writing to a caller-provided std::ostream& in single_mode.

Definition at line 2272 of file log_macros.hpp.

◆ LOGIT_ADD_CONSOLE_STREAM_SINGLE_MODE

#define LOGIT_ADD_CONSOLE_STREAM_SINGLE_MODE ( stream,
pattern,
async )
Value:
std::unique_ptr<logit::ConsoleLogger>(new logit::ConsoleLogger( \
(stream), (async))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Add a console logger writing to a caller-provided std::ostream& in single_mode.

Definition at line 2256 of file log_macros.hpp.

◆ LOGIT_ADD_CRASH_LOGGER

#define LOGIT_ADD_CRASH_LOGGER ( path,
buffer_size )
Value:
std::unique_ptr<logit::CrashLogger>( \
logit::CrashLogger::Config{path, buffer_size})), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_FILE_LOGGER_PATTERN)))
Stub implementation on non-POSIX platforms.
#define LOGIT_FILE_LOGGER_PATTERN
Defines the default log pattern for file-based loggers.
Definition config.hpp:130

Macro for adding a crash logger with custom configuration.

Parameters
pathPath where the crash log should be written.
buffer_sizeSize of the in-memory buffer preserving recent messages. This version uses new and std::unique_ptr for C++11 compatibility.

Definition at line 2523 of file log_macros.hpp.

◆ LOGIT_ADD_CRASH_LOGGER_DEFAULT

#define LOGIT_ADD_CRASH_LOGGER_DEFAULT ( )
Value:
std::unique_ptr<logit::CrashLogger>(new logit::CrashLogger()), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_FILE_LOGGER_PATTERN)))

Macro for adding a crash logger with default configuration.

This version uses new and std::unique_ptr for C++11 compatibility.

Definition at line 2543 of file log_macros.hpp.

◆ LOGIT_ADD_CRASH_LOGGER_SINGLE_MODE

#define LOGIT_ADD_CRASH_LOGGER_SINGLE_MODE ( path,
buffer_size )
Value:
std::unique_ptr<logit::CrashLogger>( \
logit::CrashLogger::Config{path, buffer_size})), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_FILE_LOGGER_PATTERN)), \
true)

Macro for adding a crash logger with custom configuration in single_mode.

In single_mode, the crash 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 2533 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG

#define LOGIT_ADD_EVENT_LOG ( source_wide,
async )
Value:
std::unique_ptr<logit::EventLogLogger>(new logit::EventLogLogger(source_wide, async)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
false)
Stub logger when Windows Event Log is unavailable.

Macro for adding a Windows Event Log logger with custom configuration.

Parameters
source_wideWide-character name of the event source.
asyncBoolean 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 2704 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG_CONFIG

#define LOGIT_ADD_EVENT_LOG_CONFIG ( config)
Value:
std::unique_ptr<logit::EventLogLogger>(new logit::EventLogLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
false)

Add a Windows Event Log logger from an explicit EventLogLogger::Config.

Definition at line 2722 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG_CONFIG_SINGLE_MODE

#define LOGIT_ADD_EVENT_LOG_CONFIG_SINGLE_MODE ( config)
Value:
std::unique_ptr<logit::EventLogLogger>(new logit::EventLogLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Add a Windows Event Log logger from an explicit EventLogLogger::Config in single_mode.

Definition at line 2729 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG_DEDICATED

#define LOGIT_ADD_EVENT_LOG_DEDICATED ( source_wide,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_EVENT_LOG_EX((source_wide), true, true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_EVENT_LOG_EX(source_wide, async, use_dedicated_executor, queue_capacity, queue_policy)
Add a Windows Event Log logger with explicit async executor settings.

Add an async Windows Event Log logger backed by a dedicated executor.

Definition at line 2754 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG_DEDICATED_SINGLE_MODE

#define LOGIT_ADD_EVENT_LOG_DEDICATED_SINGLE_MODE ( source_wide,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_EVENT_LOG_EX_SINGLE_MODE((source_wide), true, true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_EVENT_LOG_EX_SINGLE_MODE(source_wide, async, use_dedicated_executor, queue_capacity, queue_policy)
Add a Windows Event Log logger with explicit async executor settings in single_mode.

Add an async Windows Event Log logger backed by a dedicated executor in single_mode.

Definition at line 2758 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG_DEFAULT

#define LOGIT_ADD_EVENT_LOG_DEFAULT ( )
Value:
LOGIT_ADD_EVENT_LOG(L"LogIt", true)
#define LOGIT_ADD_EVENT_LOG(source_wide, async)
Macro for adding a Windows Event Log logger with custom configuration.

Macro for adding a Windows Event Log logger with default configuration.

This version uses new and std::unique_ptr for C++11 compatibility.

Definition at line 2763 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG_EX

#define LOGIT_ADD_EVENT_LOG_EX ( source_wide,
async,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::EventLogLogger>(new logit::EventLogLogger( \
(source_wide), (async), (use_dedicated_executor), \
(queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
false)

Add a Windows Event Log logger with explicit async executor settings.

Definition at line 2736 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG_EX_SINGLE_MODE

#define LOGIT_ADD_EVENT_LOG_EX_SINGLE_MODE ( source_wide,
async,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::EventLogLogger>(new logit::EventLogLogger( \
(source_wide), (async), (use_dedicated_executor), \
(queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Add a Windows Event Log logger with explicit async executor settings in single_mode.

Definition at line 2745 of file log_macros.hpp.

◆ LOGIT_ADD_EVENT_LOG_SINGLE_MODE

#define LOGIT_ADD_EVENT_LOG_SINGLE_MODE ( source_wide,
async )
Value:
std::unique_ptr<logit::EventLogLogger>(new logit::EventLogLogger(source_wide, async)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Macro for adding a Windows Event Log logger with custom configuration in single_mode.

Parameters
source_wideWide-character name of the event source.
asyncBoolean indicating whether logging should be asynchronous (true) or synchronous (false). In single_mode, the event log 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 2715 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER

#define LOGIT_ADD_FILE_LOGGER ( directory,
async,
auto_delete_days,
pattern )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
directory, async, auto_delete_days)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)))
Logs messages to files with date-based rotation and automatic deletion of old logs.

Macro for adding a file logger with specific settings.

Parameters
directoryThe directory where log files will be stored.
asyncBoolean indicating whether logging should be asynchronous (true) or synchronous (false).
auto_delete_daysNumber of days after which old log files are deleted.
patternThe format pattern for log messages. This version uses new and std::unique_ptr for C++11 compatibility.

Definition at line 2305 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_CONFIG

#define LOGIT_ADD_FILE_LOGGER_CONFIG ( config,
pattern )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)))

Add a file logger from an explicit FileLogger::Config.

Definition at line 2326 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_CONFIG_SINGLE_MODE

#define LOGIT_ADD_FILE_LOGGER_CONFIG_SINGLE_MODE ( config,
pattern )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Add a file logger from an explicit FileLogger::Config in single_mode.

Definition at line 2332 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_DEDICATED

#define LOGIT_ADD_FILE_LOGGER_DEDICATED ( directory,
auto_delete_days,
pattern,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_FILE_LOGGER_EX((directory), true, (auto_delete_days), (pattern), true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_FILE_LOGGER_EX(directory, async, auto_delete_days, pattern, use_dedicated_executor, queue_capacity, queue_policy)
Add a file logger with explicit async executor settings.

Add an async file logger backed by a dedicated executor.

Definition at line 2356 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_DEDICATED_SINGLE_MODE

#define LOGIT_ADD_FILE_LOGGER_DEDICATED_SINGLE_MODE ( directory,
auto_delete_days,
pattern,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_FILE_LOGGER_EX_SINGLE_MODE((directory), true, (auto_delete_days), (pattern), true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_FILE_LOGGER_EX_SINGLE_MODE(directory, async, auto_delete_days, pattern, use_dedicated_executor, queue_capacity, queue_policy)
Add a file logger with explicit async executor settings in single_mode.

Add an async file logger backed by a dedicated executor in single_mode.

Definition at line 2360 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_DEFAULT

#define LOGIT_ADD_FILE_LOGGER_DEFAULT ( )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
std::unique_ptr<logit::SimpleLogFormatter>( \
#define LOGIT_FILE_LOGGER_PATH
Defines the default directory path for log files.
Definition config.hpp:105
#define LOGIT_FILE_LOGGER_AUTO_DELETE_DAYS
Defines the number of days after which old log files are deleted.
Definition config.hpp:122

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 2366 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_DEFAULT_SINGLE_MODE

#define LOGIT_ADD_FILE_LOGGER_DEFAULT_SINGLE_MODE ( )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
std::unique_ptr<logit::SimpleLogFormatter>( \
true)

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 2377 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_DEFAULT_WITH_ROTATION

#define LOGIT_ADD_FILE_LOGGER_DEFAULT_WITH_ROTATION ( )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_FILE_LOGGER_PATTERN)))
#define LOGIT_FILE_LOGGER_MAX_ROTATED_FILES
Definition config.hpp:137
#define LOGIT_FILE_LOGGER_MAX_FILE_SIZE_BYTES
Definition config.hpp:134

Definition at line 2420 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_EX

#define LOGIT_ADD_FILE_LOGGER_EX ( directory,
async,
auto_delete_days,
pattern,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
(directory), (async), (auto_delete_days), (use_dedicated_executor), \
(queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)))

Add a file logger with explicit async executor settings.

Definition at line 2339 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_EX_SINGLE_MODE

#define LOGIT_ADD_FILE_LOGGER_EX_SINGLE_MODE ( directory,
async,
auto_delete_days,
pattern,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
(directory), (async), (auto_delete_days), (use_dedicated_executor), \
(queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Add a file logger with explicit async executor settings in single_mode.

Definition at line 2347 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_SINGLE_MODE

#define LOGIT_ADD_FILE_LOGGER_SINGLE_MODE ( directory,
async,
auto_delete_days,
pattern )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
directory, async, auto_delete_days)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Macro for adding a file logger in single_mode with specific settings.

Parameters
directoryThe directory where log files will be stored.
asyncBoolean indicating whether logging should be asynchronous (true) or synchronous (false).
auto_delete_daysNumber of days after which old log files are deleted.
patternThe 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 2318 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_WITH_ROTATION

#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION ( dir,
async,
days,
pattern,
max_bytes,
max_files )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
dir, async, days, max_bytes, max_files)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)))

Definition at line 2386 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_DEDICATED

#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_DEDICATED ( dir,
days,
pattern,
max_bytes,
max_files,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX((dir), true, (days), (pattern), (max_bytes), (max_files), true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX(dir, async, days, pattern, max_bytes, max_files, use_dedicated_executor, queue_capacity, queue_policy)

Definition at line 2414 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_DEDICATED_SINGLE_MODE

#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_DEDICATED_SINGLE_MODE ( dir,
days,
pattern,
max_bytes,
max_files,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX_SINGLE_MODE((dir), true, (days), (pattern), (max_bytes), (max_files), true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX_SINGLE_MODE(dir, async, days, pattern, max_bytes, max_files, use_dedicated_executor, queue_capacity, queue_policy)

Definition at line 2417 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX

#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX ( dir,
async,
days,
pattern,
max_bytes,
max_files,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
(dir), (async), (days), (max_bytes), (max_files), \
(use_dedicated_executor), (queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)))

Definition at line 2399 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX_SINGLE_MODE

#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_EX_SINGLE_MODE ( dir,
async,
days,
pattern,
max_bytes,
max_files,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
(dir), (async), (days), (max_bytes), (max_files), \
(use_dedicated_executor), (queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Definition at line 2406 of file log_macros.hpp.

◆ LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_SINGLE_MODE

#define LOGIT_ADD_FILE_LOGGER_WITH_ROTATION_SINGLE_MODE ( dir,
async,
days,
pattern,
max_bytes,
max_files )
Value:
std::unique_ptr<logit::FileLogger>(new logit::FileLogger( \
dir, async, days, max_bytes, max_files)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Definition at line 2392 of file log_macros.hpp.

◆ LOGIT_ADD_LOG_CALLBACK

#define LOGIT_ADD_LOG_CALLBACK ( logger_index,
callback )
Value:
([](int _idx, ::logit::ILogSubscriber::Callback _cb) -> uint64_t { \
auto* _subscriber = LOGIT_GET_LOG_SUBSCRIBER(_idx); \
return _subscriber ? _subscriber->add_log_callback(std::move(_cb)) : 0; \
}((logger_index), (callback)))
std::function< void(const LogRecordSnapshot &)> Callback
#define LOGIT_GET_LOG_SUBSCRIBER(logger_index)
Retrieves a live-subscription interface from a logger by index.

Registers a callback to receive newly written log records.

Parameters
logger_indexIndex of logger.
callbackFunction invoked with an owning LogRecordSnapshot after each commit.
Returns
Callback id (0 if the backend does not support subscriptions).

Definition at line 3051 of file log_macros.hpp.

◆ LOGIT_ADD_LOGGER

#define LOGIT_ADD_LOGGER ( logger_type,
logger_args,
formatter_type,
formatter_args )
Value:
std::unique_ptr<logger_type>(new logger_type logger_args), \
std::unique_ptr<formatter_type>(new formatter_type formatter_args), \
false)

Macro for adding a logger with a specific formatter.

Parameters
logger_typeThe type of logger (e.g., ConsoleLogger).
logger_argsArguments for the logger constructor, enclosed in parentheses.
formatter_typeThe type of formatter (e.g., SimpleLogFormatter).
formatter_argsArguments for the formatter constructor, enclosed in parentheses. This version uses new and std::unique_ptr for C++11 compatibility.

Definition at line 2168 of file log_macros.hpp.

◆ LOGIT_ADD_LOGGER_SINGLE_MODE

#define LOGIT_ADD_LOGGER_SINGLE_MODE ( logger_type,
logger_args,
formatter_type,
formatter_args )
Value:
std::unique_ptr<logger_type>(new logger_type logger_args), \
std::unique_ptr<formatter_type>(new formatter_type formatter_args), \
true)

Macro for adding a logger with a specific formatter in single_mode.

Parameters
logger_typeThe type of logger (e.g., ConsoleLogger).
logger_argsArguments for the logger constructor, enclosed in parentheses.
formatter_typeThe type of formatter (e.g., SimpleLogFormatter).
formatter_argsArguments 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 2181 of file log_macros.hpp.

◆ LOGIT_ADD_MEMORY_LOGGER

#define LOGIT_ADD_MEMORY_LOGGER ( max_records,
max_bytes,
max_age_ms )
Value:
std::unique_ptr<logit::MemoryLogger>(new logit::MemoryLogger( \
logit::MemoryLogger::Config{max_records, max_bytes, max_age_ms})), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter("%v")))
Stores the latest formatted log messages in memory.
Retention limits for the in-memory buffer.

Macro for adding an in-memory logger with explicit limits.

Parameters
max_recordsMaximum number of buffered entries (0 = unlimited).
max_bytesMaximum total buffered message bytes (0 = unlimited).
max_age_msMaximum age of buffered entries in milliseconds (0 = unlimited).

Definition at line 2552 of file log_macros.hpp.

◆ LOGIT_ADD_MEMORY_LOGGER_DEFAULT

#define LOGIT_ADD_MEMORY_LOGGER_DEFAULT ( )
Value:
LOGIT_ADD_MEMORY_LOGGER(1000, 1024 * 1024, 24LL * 60 * 60 * 1000)
#define LOGIT_ADD_MEMORY_LOGGER(max_records, max_bytes, max_age_ms)
Macro for adding an in-memory logger with explicit limits.

Macro for adding an in-memory logger with default retention settings.

Definition at line 2567 of file log_macros.hpp.

◆ LOGIT_ADD_MEMORY_LOGGER_DEFAULT_SINGLE_MODE

#define LOGIT_ADD_MEMORY_LOGGER_DEFAULT_SINGLE_MODE ( )
Value:
LOGIT_ADD_MEMORY_LOGGER_SINGLE_MODE(1000, 1024 * 1024, 24LL * 60 * 60 * 1000)
#define LOGIT_ADD_MEMORY_LOGGER_SINGLE_MODE(max_records, max_bytes, max_age_ms)
Macro for adding an in-memory logger in single_mode with explicit limits.

Macro for adding an in-memory logger in single_mode with default retention settings.

Definition at line 2571 of file log_macros.hpp.

◆ LOGIT_ADD_MEMORY_LOGGER_SINGLE_MODE

#define LOGIT_ADD_MEMORY_LOGGER_SINGLE_MODE ( max_records,
max_bytes,
max_age_ms )
Value:
std::unique_ptr<logit::MemoryLogger>(new logit::MemoryLogger( \
logit::MemoryLogger::Config{max_records, max_bytes, max_age_ms})), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter("%v")), \
true)

Macro for adding an in-memory logger in single_mode with explicit limits.

Definition at line 2559 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG

#define LOGIT_ADD_SYSLOG ( ident,
facility,
async )
Value:
std::unique_ptr<logit::SyslogLogger>(new logit::SyslogLogger(ident, facility, async)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
false)
Stub logger when syslog is unavailable.

Macro for adding a syslog logger with custom configuration.

Parameters
identSyslog identifier used to tag the log entries.
facilitySyslog facility value (e.g., LOG_USER).
asyncBoolean 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 2638 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG_CONFIG

#define LOGIT_ADD_SYSLOG_CONFIG ( config)
Value:
std::unique_ptr<logit::SyslogLogger>(new logit::SyslogLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
false)

Add a syslog logger from an explicit SyslogLogger::Config.

Definition at line 2657 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG_CONFIG_SINGLE_MODE

#define LOGIT_ADD_SYSLOG_CONFIG_SINGLE_MODE ( config)
Value:
std::unique_ptr<logit::SyslogLogger>(new logit::SyslogLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Add a syslog logger from an explicit SyslogLogger::Config in single_mode.

Definition at line 2664 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG_DEDICATED

#define LOGIT_ADD_SYSLOG_DEDICATED ( ident,
facility,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_SYSLOG_EX((ident), (facility), true, true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_SYSLOG_EX(ident, facility, async, use_dedicated_executor, queue_capacity, queue_policy)
Add a syslog logger with explicit async executor settings.

Add an async syslog logger backed by a dedicated executor.

Definition at line 2689 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG_DEDICATED_SINGLE_MODE

#define LOGIT_ADD_SYSLOG_DEDICATED_SINGLE_MODE ( ident,
facility,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_SYSLOG_EX_SINGLE_MODE((ident), (facility), true, true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_SYSLOG_EX_SINGLE_MODE(ident, facility, async, use_dedicated_executor, queue_capacity, queue_policy)
Add a syslog logger with explicit async executor settings in single_mode.

Add an async syslog logger backed by a dedicated executor in single_mode.

Definition at line 2693 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG_DEFAULT

#define LOGIT_ADD_SYSLOG_DEFAULT ( )
Value:
LOGIT_ADD_SYSLOG("log-it", LOG_USER, true)
#define LOGIT_ADD_SYSLOG(ident, facility, async)
Macro for adding a syslog logger with custom configuration.

Macro for adding a syslog logger with default configuration.

This version uses new and std::unique_ptr for C++11 compatibility.

Definition at line 2698 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG_EX

#define LOGIT_ADD_SYSLOG_EX ( ident,
facility,
async,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::SyslogLogger>(new logit::SyslogLogger( \
(ident), (facility), (async), (use_dedicated_executor), \
(queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
false)

Add a syslog logger with explicit async executor settings.

Definition at line 2671 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG_EX_SINGLE_MODE

#define LOGIT_ADD_SYSLOG_EX_SINGLE_MODE ( ident,
facility,
async,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::SyslogLogger>(new logit::SyslogLogger( \
(ident), (facility), (async), (use_dedicated_executor), \
(queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Add a syslog logger with explicit async executor settings in single_mode.

Definition at line 2680 of file log_macros.hpp.

◆ LOGIT_ADD_SYSLOG_SINGLE_MODE

#define LOGIT_ADD_SYSLOG_SINGLE_MODE ( ident,
facility,
async )
Value:
std::unique_ptr<logit::SyslogLogger>(new logit::SyslogLogger(ident, facility, async)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Macro for adding a syslog logger with custom configuration in single_mode.

Parameters
identSyslog identifier used to tag the log entries.
facilitySyslog facility value (e.g., LOG_USER).
asyncBoolean indicating whether logging should be asynchronous (true) or synchronous (false). In single_mode, the syslog 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 2650 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER

#define LOGIT_ADD_UNIQUE_FILE_LOGGER ( directory,
async,
auto_delete_days,
hash_length,
pattern )
Value:
std::unique_ptr<logit::UniqueFileLogger>(new logit::UniqueFileLogger( \
directory, async, auto_delete_days, hash_length)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)))
Writes each log message to a unique file with automatic cleanup.

Macro for adding a unique file logger with custom parameters.

Parameters
directoryThe directory where log files will be stored.
asyncBoolean indicating whether logging should be asynchronous (true) or synchronous (false).
auto_delete_daysNumber of days after which old log files are deleted.
hash_lengthThe length of the hash to be appended to the log file name.
patternThe format pattern for log messages. This version uses new and std::unique_ptr for C++11 compatibility.

Definition at line 2434 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_CONFIG

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_CONFIG ( config,
pattern )
Value:
std::unique_ptr<logit::UniqueFileLogger>(new logit::UniqueFileLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)))

Add a unique file logger from an explicit UniqueFileLogger::Config.

Definition at line 2456 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_CONFIG_SINGLE_MODE

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_CONFIG_SINGLE_MODE ( config,
pattern )
Value:
std::unique_ptr<logit::UniqueFileLogger>(new logit::UniqueFileLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Add a unique file logger from an explicit UniqueFileLogger::Config in single_mode.

Definition at line 2462 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_DEDICATED

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEDICATED ( directory,
auto_delete_days,
hash_length,
pattern,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_UNIQUE_FILE_LOGGER_EX((directory), true, (auto_delete_days), (hash_length), (pattern), true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_EX(directory, async, auto_delete_days, hash_length, pattern, use_dedicated_executor, queue_capacity, queue_policy)
Add a unique file logger with explicit async executor settings.

Add an async unique file logger backed by a dedicated executor.

Definition at line 2486 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_DEDICATED_SINGLE_MODE

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEDICATED_SINGLE_MODE ( directory,
auto_delete_days,
hash_length,
pattern,
queue_capacity,
queue_policy )
Value:
LOGIT_ADD_UNIQUE_FILE_LOGGER_EX_SINGLE_MODE((directory), true, (auto_delete_days), (hash_length), (pattern), true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_UNIQUE_FILE_LOGGER_EX_SINGLE_MODE(directory, async, auto_delete_days, hash_length, pattern, use_dedicated_executor, queue_capacity, queue_policy)
Add a unique file logger with explicit async executor settings in single_mode.

Add an async unique file logger backed by a dedicated executor in single_mode.

Definition at line 2490 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT ( )
Value:
std::unique_ptr<logit::UniqueFileLogger>(new logit::UniqueFileLogger( \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_UNIQUE_FILE_LOGGER_PATTERN)))
#define LOGIT_UNIQUE_FILE_LOGGER_PATTERN
Defines the default log pattern for unique file-based loggers.
Definition config.hpp:143
#define LOGIT_UNIQUE_FILE_LOGGER_PATH
Defines the default directory path for unique log files.
Definition config.hpp:114

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 2498 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT_SINGLE_MODE

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_DEFAULT_SINGLE_MODE ( )
Value:
std::unique_ptr<logit::UniqueFileLogger>(new logit::UniqueFileLogger( \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_UNIQUE_FILE_LOGGER_PATTERN)), \
true)

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 2511 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_EX

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_EX ( directory,
async,
auto_delete_days,
hash_length,
pattern,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::UniqueFileLogger>(new logit::UniqueFileLogger( \
(directory), (async), (auto_delete_days), (hash_length), \
(use_dedicated_executor), (queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)))

Add a unique file logger with explicit async executor settings.

Definition at line 2469 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_EX_SINGLE_MODE

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_EX_SINGLE_MODE ( directory,
async,
auto_delete_days,
hash_length,
pattern,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::UniqueFileLogger>(new logit::UniqueFileLogger( \
(directory), (async), (auto_delete_days), (hash_length), \
(use_dedicated_executor), (queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Add a unique file logger with explicit async executor settings in single_mode.

Definition at line 2477 of file log_macros.hpp.

◆ LOGIT_ADD_UNIQUE_FILE_LOGGER_SINGLE_MODE

#define LOGIT_ADD_UNIQUE_FILE_LOGGER_SINGLE_MODE ( directory,
async,
auto_delete_days,
hash_length,
pattern )
Value:
std::unique_ptr<logit::UniqueFileLogger>(new logit::UniqueFileLogger( \
directory, async, auto_delete_days, hash_length)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(pattern)), \
true)

Macro for adding a unique file logger in single_mode with custom parameters.

Parameters
directoryThe directory where log files will be stored.
asyncBoolean indicating whether logging should be asynchronous (true) or synchronous (false).
auto_delete_daysNumber of days after which old log files are deleted.
hash_lengthThe length of the hash to be appended to the log file name.
patternThe 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 2448 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG

#define LOGIT_ADD_WINDOWS_DEBUG ( async)
Value:
std::unique_ptr<logit::WindowsDebugLogger>(new logit::WindowsDebugLogger( \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)))
Outputs formatted log messages to the Windows debug console or stderr.
Configuration for the Windows debug logger.

Macro for adding a Windows debug logger.

Parameters
asyncBoolean 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 2577 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG_CONFIG

#define LOGIT_ADD_WINDOWS_DEBUG_CONFIG ( config)
Value:
std::unique_ptr<logit::WindowsDebugLogger>(new logit::WindowsDebugLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)))

Add a Windows debug logger from an explicit WindowsDebugLogger::Config.

Definition at line 2594 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG_CONFIG_SINGLE_MODE

#define LOGIT_ADD_WINDOWS_DEBUG_CONFIG_SINGLE_MODE ( config)
Value:
std::unique_ptr<logit::WindowsDebugLogger>(new logit::WindowsDebugLogger(config)), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Add a Windows debug logger from an explicit WindowsDebugLogger::Config in single_mode.

Definition at line 2600 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG_DEDICATED

#define LOGIT_ADD_WINDOWS_DEBUG_DEDICATED ( queue_capacity,
queue_policy )
Value:
LOGIT_ADD_WINDOWS_DEBUG_EX(true, true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_WINDOWS_DEBUG_EX(async, use_dedicated_executor, queue_capacity, queue_policy)
Add a Windows debug logger with explicit async executor settings.

Add an async Windows debug logger backed by a dedicated executor.

Definition at line 2622 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG_DEDICATED_SINGLE_MODE

#define LOGIT_ADD_WINDOWS_DEBUG_DEDICATED_SINGLE_MODE ( queue_capacity,
queue_policy )
Value:
LOGIT_ADD_WINDOWS_DEBUG_EX_SINGLE_MODE(true, true, (queue_capacity), (queue_policy))
#define LOGIT_ADD_WINDOWS_DEBUG_EX_SINGLE_MODE(async, use_dedicated_executor, queue_capacity, queue_policy)
Add a Windows debug logger with explicit async executor settings in single_mode.

Add an async Windows debug logger backed by a dedicated executor in single_mode.

Definition at line 2626 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG_DEFAULT

#define LOGIT_ADD_WINDOWS_DEBUG_DEFAULT ( )
Value:
#define LOGIT_ADD_WINDOWS_DEBUG(async)
Macro for adding a Windows debug logger.

Macro for adding a Windows debug logger with default settings.

Definition at line 2630 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG_EX

#define LOGIT_ADD_WINDOWS_DEBUG_EX ( async,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::WindowsDebugLogger>(new logit::WindowsDebugLogger( \
(async), (use_dedicated_executor), (queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)))

Add a Windows debug logger with explicit async executor settings.

Definition at line 2607 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG_EX_SINGLE_MODE

#define LOGIT_ADD_WINDOWS_DEBUG_EX_SINGLE_MODE ( async,
use_dedicated_executor,
queue_capacity,
queue_policy )
Value:
std::unique_ptr<logit::WindowsDebugLogger>(new logit::WindowsDebugLogger( \
(async), (use_dedicated_executor), (queue_capacity), (queue_policy))), \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Add a Windows debug logger with explicit async executor settings in single_mode.

Definition at line 2614 of file log_macros.hpp.

◆ LOGIT_ADD_WINDOWS_DEBUG_SINGLE_MODE

#define LOGIT_ADD_WINDOWS_DEBUG_SINGLE_MODE ( async)
Value:
std::unique_ptr<logit::WindowsDebugLogger>(new logit::WindowsDebugLogger( \
std::unique_ptr<logit::SimpleLogFormatter>(new logit::SimpleLogFormatter(LOGIT_CONSOLE_PATTERN)), \
true)

Macro for adding a Windows debug logger in single_mode.

Parameters
asyncBoolean 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 2586 of file log_macros.hpp.

◆ LOGIT_CLEAR_ALL_LOGGERS

#define LOGIT_CLEAR_ALL_LOGGERS ( )
Value:
LogClearResult clear_all_loggers(const LogClearOptions &options=LogClearOptions())
Clears logger-owned records for all registered loggers.
Definition Logger.hpp:457

Clears logger-owned records for all registered loggers.

Returns
Aggregated cleanup result.

Definition at line 2863 of file log_macros.hpp.

◆ LOGIT_CLEAR_ALL_LOGGERS_EX

#define LOGIT_CLEAR_ALL_LOGGERS_EX ( options)
Value:

Clears logger-owned records for all registered loggers with options.

Parameters
optionsLogClearOptions value.
Returns
Aggregated cleanup result.

Definition at line 2869 of file log_macros.hpp.

◆ LOGIT_CLEAR_LOGGER

#define LOGIT_CLEAR_LOGGER ( logger_index)
Value:
LogClearResult clear_logger(int logger_index, const LogClearOptions &options=LogClearOptions())
Clears logger-owned records for a specific logger.
Definition Logger.hpp:427

Clears logger-owned records for a specific logger.

Parameters
logger_indexIndex of logger.
Returns
Cleanup result for the selected logger.

Definition at line 2851 of file log_macros.hpp.

◆ LOGIT_CLEAR_LOGGER_EX

#define LOGIT_CLEAR_LOGGER_EX ( logger_index,
options )
Value:
logit::Logger::get_instance().clear_logger(logger_index, options)

Clears logger-owned records for a specific logger with options.

Parameters
logger_indexIndex of logger.
optionsLogClearOptions value.
Returns
Cleanup result for the selected logger.

Definition at line 2858 of file log_macros.hpp.

◆ LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_LOG_MACROS_HPP_INCLUDED

#define LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_LOG_MACROS_HPP_INCLUDED

Definition at line 3 of file log_macros.hpp.

◆ LOGIT_DEBUG

#define LOGIT_DEBUG ( ...)
Value:
#define LOGIT_LOG_AND_RETURN(level, format, arg_names,...)
Logs a message with arguments.

Definition at line 809 of file log_macros.hpp.

◆ LOGIT_DEBUG0

#define LOGIT_DEBUG0 ( )

◆ LOGIT_DEBUG0_IF

#define LOGIT_DEBUG0_IF ( condition)

◆ LOGIT_DEBUG0_TO

#define LOGIT_DEBUG0_TO ( index)

◆ LOGIT_DEBUG_EVERY_N

#define LOGIT_DEBUG_EVERY_N ( n,
... )
Value:
#define LOGIT_EVERY_N(level, n,...)

Definition at line 1396 of file log_macros.hpp.

◆ LOGIT_DEBUG_IF

#define LOGIT_DEBUG_IF ( condition,
... )
Value:
#define LOGIT_DETAIL_CONDITIONAL(level, condition,...)

Definition at line 1167 of file log_macros.hpp.

◆ LOGIT_DEBUG_ONCE

#define LOGIT_DEBUG_ONCE ( ...)
Value:
#define LOGIT_ONCE(level,...)

Definition at line 1389 of file log_macros.hpp.

◆ LOGIT_DEBUG_TAG

#define LOGIT_DEBUG_TAG ( msg,
... )
Value:
#define LOGIT_PRINT_DEBUG(...)
std::string format_tags(std::initializer_list< std::pair< std::string, std::string > > tags)
Format tag list into a single string.
Definition tag_utils.hpp:47

Definition at line 1412 of file log_macros.hpp.

◆ LOGIT_DEBUG_THROTTLE

#define LOGIT_DEBUG_THROTTLE ( p,
... )
Value:
#define LOGIT_THROTTLE(level, period_ms,...)

Definition at line 1403 of file log_macros.hpp.

◆ LOGIT_DEBUG_TO

#define LOGIT_DEBUG_TO ( index,
... )
Value:
#define LOGIT_LOG_AND_RETURN_WITH_INDEX(level, index, format, arg_names,...)
Logs a message with arguments to a specific logger.

Definition at line 826 of file log_macros.hpp.

◆ LOGIT_DETAIL_CONDITIONAL

#define LOGIT_DETAIL_CONDITIONAL ( level,
condition,
... )
Value:
condition, \
LOGIT_LOG_AND_RETURN(level, {}, #__VA_ARGS__, __VA_ARGS__))
#define LOGIT_DETAIL_CONDITIONAL_CALL(condition, expression)

Definition at line 1032 of file log_macros.hpp.

◆ LOGIT_DETAIL_CONDITIONAL_CALL

#define LOGIT_DETAIL_CONDITIONAL_CALL ( condition,
expression )
Value:
do { \
if (condition) \
expression; \
} while (0)

Definition at line 1026 of file log_macros.hpp.

◆ LOGIT_DETAIL_CONDITIONAL_FORMAT

#define LOGIT_DETAIL_CONDITIONAL_FORMAT ( level,
condition,
fmt,
... )
Value:
condition, \
LOGIT_LOG_AND_RETURN(level, fmt, #__VA_ARGS__, __VA_ARGS__))

Definition at line 1040 of file log_macros.hpp.

◆ LOGIT_DETAIL_CONDITIONAL_NOARGS

#define LOGIT_DETAIL_CONDITIONAL_NOARGS ( level,
condition )
Value:

Definition at line 1037 of file log_macros.hpp.

◆ LOGIT_DETAIL_CONDITIONAL_PRINT

#define LOGIT_DETAIL_CONDITIONAL_PRINT ( level,
condition,
... )
Value:
condition, \
LOGIT_LOG_AND_RETURN_PRINT(level, #__VA_ARGS__, __VA_ARGS__))
#define LOGIT_LOG_AND_RETURN_PRINT(level, arg_names,...)
Logs a message with arguments, but prints them without using a format string.

Definition at line 1045 of file log_macros.hpp.

◆ LOGIT_DETAIL_CONDITIONAL_PRINTF

#define LOGIT_DETAIL_CONDITIONAL_PRINTF ( level,
condition,
fmt,
... )
Value:
condition, \
LOGIT_LOG_AND_RETURN_NOARGS(level, logit::format(fmt, __VA_ARGS__)))
std::string format(const char *fmt,...)
Formats a string according to the specified format.
Definition format.hpp:22

Definition at line 1050 of file log_macros.hpp.

◆ LOGIT_DETAIL_SCOPE

#define LOGIT_DETAIL_SCOPE ( level,
phase )
Value:
::logit::detail::ScopeTimer LOGIT_CONCAT(_logit_scope_, __COUNTER__)(level, (phase), __FILE__, __LINE__, LOGIT_FUNCTION, -1, 0)
#define LOGIT_CONCAT(x, y)
Concatenate two tokens with macro expansion.
#define LOGIT_FUNCTION

Definition at line 258 of file log_macros.hpp.

◆ LOGIT_DETAIL_SCOPE_FMT

#define LOGIT_DETAIL_SCOPE_FMT ( level,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 275 of file log_macros.hpp.

◆ LOGIT_DETAIL_SCOPE_FMT_T

#define LOGIT_DETAIL_SCOPE_FMT_T ( level,
threshold_ms,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 276 of file log_macros.hpp.

◆ LOGIT_DETAIL_SCOPE_PRINTF

#define LOGIT_DETAIL_SCOPE_PRINTF ( level,
fmt_str,
... )
Value:
::logit::detail::ScopeTimer LOGIT_CONCAT(_logit_scope_, __COUNTER__)(level, logit::format(fmt_str, __VA_ARGS__), __FILE__, __LINE__, LOGIT_FUNCTION, -1, 0)

Definition at line 264 of file log_macros.hpp.

◆ LOGIT_DETAIL_SCOPE_PRINTF_T

#define LOGIT_DETAIL_SCOPE_PRINTF_T ( level,
threshold_ms,
fmt_str,
... )
Value:
::logit::detail::ScopeTimer LOGIT_CONCAT(_logit_scope_, __COUNTER__)(level, logit::format(fmt_str, __VA_ARGS__), __FILE__, __LINE__, LOGIT_FUNCTION, -1, (threshold_ms))

Definition at line 266 of file log_macros.hpp.

◆ LOGIT_DETAIL_SCOPE_T

#define LOGIT_DETAIL_SCOPE_T ( level,
threshold_ms,
phase )
Value:
::logit::detail::ScopeTimer LOGIT_CONCAT(_logit_scope_, __COUNTER__)(level, (phase), __FILE__, __LINE__, LOGIT_FUNCTION, -1, (threshold_ms))

Definition at line 261 of file log_macros.hpp.

◆ LOGIT_ERROR

#define LOGIT_ERROR ( ...)
Value:

Definition at line 915 of file log_macros.hpp.

◆ LOGIT_ERROR0

#define LOGIT_ERROR0 ( )

◆ LOGIT_ERROR0_IF

#define LOGIT_ERROR0_IF ( condition)

◆ LOGIT_ERROR0_TO

#define LOGIT_ERROR0_TO ( index)

◆ LOGIT_ERROR_EVERY_N

#define LOGIT_ERROR_EVERY_N ( n,
... )
Value:

Definition at line 1399 of file log_macros.hpp.

◆ LOGIT_ERROR_IF

#define LOGIT_ERROR_IF ( condition,
... )
Value:

Definition at line 1265 of file log_macros.hpp.

◆ LOGIT_ERROR_ONCE

#define LOGIT_ERROR_ONCE ( ...)
Value:

Definition at line 1392 of file log_macros.hpp.

◆ LOGIT_ERROR_TAG

#define LOGIT_ERROR_TAG ( msg,
... )
Value:
#define LOGIT_PRINT_ERROR(...)

Definition at line 1415 of file log_macros.hpp.

◆ LOGIT_ERROR_THROTTLE

#define LOGIT_ERROR_THROTTLE ( p,
... )
Value:

Definition at line 1406 of file log_macros.hpp.

◆ LOGIT_ERROR_TO

#define LOGIT_ERROR_TO ( index,
... )
Value:

Definition at line 932 of file log_macros.hpp.

◆ LOGIT_EVERY_N

#define LOGIT_EVERY_N ( level,
n,
... )
Value:
do { \
static unsigned LOGIT_CONCAT(_logit_count_, __LINE__) = 0; \
if (++LOGIT_CONCAT(_logit_count_, __LINE__) % (n) == 0) { \
LOGIT_LOG_AND_RETURN(level, {}, #__VA_ARGS__, __VA_ARGS__); \
} \
} while (0)

Definition at line 1370 of file log_macros.hpp.

◆ LOGIT_FATAL

#define LOGIT_FATAL ( ...)
Value:

Definition at line 968 of file log_macros.hpp.

◆ LOGIT_FATAL0

#define LOGIT_FATAL0 ( )

◆ LOGIT_FATAL0_IF

#define LOGIT_FATAL0_IF ( condition)

◆ LOGIT_FATAL0_TO

#define LOGIT_FATAL0_TO ( index)

◆ LOGIT_FATAL_EVERY_N

#define LOGIT_FATAL_EVERY_N ( n,
... )
Value:

Definition at line 1400 of file log_macros.hpp.

◆ LOGIT_FATAL_IF

#define LOGIT_FATAL_IF ( condition,
... )
Value:

Definition at line 1314 of file log_macros.hpp.

◆ LOGIT_FATAL_ONCE

#define LOGIT_FATAL_ONCE ( ...)
Value:

Definition at line 1393 of file log_macros.hpp.

◆ LOGIT_FATAL_TAG

#define LOGIT_FATAL_TAG ( msg,
... )
Value:
#define LOGIT_PRINT_FATAL(...)

Definition at line 1416 of file log_macros.hpp.

◆ LOGIT_FATAL_THROTTLE

#define LOGIT_FATAL_THROTTLE ( p,
... )
Value:

Definition at line 1407 of file log_macros.hpp.

◆ LOGIT_FATAL_TO

#define LOGIT_FATAL_TO ( index,
... )
Value:

Definition at line 985 of file log_macros.hpp.

◆ LOGIT_FMT_DEBUG

#define LOGIT_FMT_DEBUG ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 822 of file log_macros.hpp.

◆ LOGIT_FMT_DEBUG_IF

#define LOGIT_FMT_DEBUG_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1195 of file log_macros.hpp.

◆ LOGIT_FMT_DEBUG_TO

#define LOGIT_FMT_DEBUG_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 839 of file log_macros.hpp.

◆ LOGIT_FMT_ERROR

#define LOGIT_FMT_ERROR ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 928 of file log_macros.hpp.

◆ LOGIT_FMT_ERROR_IF

#define LOGIT_FMT_ERROR_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1293 of file log_macros.hpp.

◆ LOGIT_FMT_ERROR_TO

#define LOGIT_FMT_ERROR_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 945 of file log_macros.hpp.

◆ LOGIT_FMT_FATAL

#define LOGIT_FMT_FATAL ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 981 of file log_macros.hpp.

◆ LOGIT_FMT_FATAL_IF

#define LOGIT_FMT_FATAL_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1342 of file log_macros.hpp.

◆ LOGIT_FMT_FATAL_TO

#define LOGIT_FMT_FATAL_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 998 of file log_macros.hpp.

◆ LOGIT_FMT_INFO

#define LOGIT_FMT_INFO ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 769 of file log_macros.hpp.

◆ LOGIT_FMT_INFO_IF

#define LOGIT_FMT_INFO_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1146 of file log_macros.hpp.

◆ LOGIT_FMT_INFO_TO

#define LOGIT_FMT_INFO_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 786 of file log_macros.hpp.

◆ LOGIT_FMT_TRACE

#define LOGIT_FMT_TRACE ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 716 of file log_macros.hpp.

◆ LOGIT_FMT_TRACE_IF

#define LOGIT_FMT_TRACE_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1097 of file log_macros.hpp.

◆ LOGIT_FMT_TRACE_TO

#define LOGIT_FMT_TRACE_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 733 of file log_macros.hpp.

◆ LOGIT_FMT_WARN

#define LOGIT_FMT_WARN ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 875 of file log_macros.hpp.

◆ LOGIT_FMT_WARN_IF

#define LOGIT_FMT_WARN_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1244 of file log_macros.hpp.

◆ LOGIT_FMT_WARN_TO

#define LOGIT_FMT_WARN_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 892 of file log_macros.hpp.

◆ LOGIT_FORMAT_DEBUG

#define LOGIT_FORMAT_DEBUG ( fmt,
... )
Value:
LOGIT_LOG_AND_RETURN(logit::LogLevel::LOG_LVL_DEBUG, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 814 of file log_macros.hpp.

◆ LOGIT_FORMAT_DEBUG_IF

#define LOGIT_FORMAT_DEBUG_IF ( condition,
fmt,
... )
Value:
logit::LogLevel::LOG_LVL_DEBUG, condition, fmt, __VA_ARGS__)
#define LOGIT_DETAIL_CONDITIONAL_FORMAT(level, condition, fmt,...)

Definition at line 1177 of file log_macros.hpp.

◆ LOGIT_FORMAT_DEBUG_TO

#define LOGIT_FORMAT_DEBUG_TO ( index,
fmt,
... )
Value:
LOGIT_LOG_AND_RETURN_WITH_INDEX(logit::LogLevel::LOG_LVL_DEBUG, index, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 831 of file log_macros.hpp.

◆ LOGIT_FORMAT_ERROR

#define LOGIT_FORMAT_ERROR ( fmt,
... )
Value:
LOGIT_LOG_AND_RETURN(logit::LogLevel::LOG_LVL_ERROR, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 920 of file log_macros.hpp.

◆ LOGIT_FORMAT_ERROR_IF

#define LOGIT_FORMAT_ERROR_IF ( condition,
fmt,
... )
Value:

Definition at line 1275 of file log_macros.hpp.

◆ LOGIT_FORMAT_ERROR_TO

#define LOGIT_FORMAT_ERROR_TO ( index,
fmt,
... )
Value:
LOGIT_LOG_AND_RETURN_WITH_INDEX(logit::LogLevel::LOG_LVL_ERROR, index, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 937 of file log_macros.hpp.

◆ LOGIT_FORMAT_FATAL

#define LOGIT_FORMAT_FATAL ( fmt,
... )
Value:
LOGIT_LOG_AND_RETURN(logit::LogLevel::LOG_LVL_FATAL, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 973 of file log_macros.hpp.

◆ LOGIT_FORMAT_FATAL_IF

#define LOGIT_FORMAT_FATAL_IF ( condition,
fmt,
... )
Value:

Definition at line 1324 of file log_macros.hpp.

◆ LOGIT_FORMAT_FATAL_TO

#define LOGIT_FORMAT_FATAL_TO ( index,
fmt,
... )
Value:
LOGIT_LOG_AND_RETURN_WITH_INDEX(logit::LogLevel::LOG_LVL_FATAL, index, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 990 of file log_macros.hpp.

◆ LOGIT_FORMAT_INFO

#define LOGIT_FORMAT_INFO ( fmt,
... )
Value:
LOGIT_LOG_AND_RETURN(logit::LogLevel::LOG_LVL_INFO, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 761 of file log_macros.hpp.

◆ LOGIT_FORMAT_INFO_IF

#define LOGIT_FORMAT_INFO_IF ( condition,
fmt,
... )
Value:

Definition at line 1128 of file log_macros.hpp.

◆ LOGIT_FORMAT_INFO_TO

#define LOGIT_FORMAT_INFO_TO ( index,
fmt,
... )
Value:
LOGIT_LOG_AND_RETURN_WITH_INDEX(logit::LogLevel::LOG_LVL_INFO, index, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 778 of file log_macros.hpp.

◆ LOGIT_FORMAT_TRACE

#define LOGIT_FORMAT_TRACE ( fmt,
... )
Value:
LOGIT_LOG_AND_RETURN(logit::LogLevel::LOG_LVL_TRACE, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 708 of file log_macros.hpp.

◆ LOGIT_FORMAT_TRACE_IF

#define LOGIT_FORMAT_TRACE_IF ( condition,
fmt,
... )
Value:

Definition at line 1079 of file log_macros.hpp.

◆ LOGIT_FORMAT_TRACE_TO

#define LOGIT_FORMAT_TRACE_TO ( index,
fmt,
... )
Value:
LOGIT_LOG_AND_RETURN_WITH_INDEX(logit::LogLevel::LOG_LVL_TRACE, index, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 725 of file log_macros.hpp.

◆ LOGIT_FORMAT_WARN

#define LOGIT_FORMAT_WARN ( fmt,
... )
Value:
LOGIT_LOG_AND_RETURN(logit::LogLevel::LOG_LVL_WARN, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 867 of file log_macros.hpp.

◆ LOGIT_FORMAT_WARN_IF

#define LOGIT_FORMAT_WARN_IF ( condition,
fmt,
... )
Value:

Definition at line 1226 of file log_macros.hpp.

◆ LOGIT_FORMAT_WARN_TO

#define LOGIT_FORMAT_WARN_TO ( index,
fmt,
... )
Value:
LOGIT_LOG_AND_RETURN_WITH_INDEX(logit::LogLevel::LOG_LVL_WARN, index, fmt, #__VA_ARGS__, __VA_ARGS__)

Definition at line 884 of file log_macros.hpp.

◆ LOGIT_GET_BUFFERED_ENTRIES

#define LOGIT_GET_BUFFERED_ENTRIES ( logger_index)
Value:
std::vector< BufferedLogEntry > get_buffered_entries(int logger_index) const
Retrieves buffered structured entries from a logger.
Definition Logger.hpp:285

Retrieves buffered structured entries from a specific logger.

Parameters
logger_indexIndex of logger.
Returns
Buffered structured entries in chronological order.

Definition at line 2825 of file log_macros.hpp.

◆ LOGIT_GET_BUFFERED_STRINGS

#define LOGIT_GET_BUFFERED_STRINGS ( logger_index)
Value:
std::vector< std::string > get_buffered_strings(int logger_index) const
Retrieves buffered formatted messages from a logger.
Definition Logger.hpp:271

Retrieves buffered formatted messages from a specific logger.

Parameters
logger_indexIndex of logger.
Returns
Buffered formatted messages in chronological order.

Definition at line 2819 of file log_macros.hpp.

◆ LOGIT_GET_DROPPED_TASKS

#define LOGIT_GET_DROPPED_TASKS ( )
Value:
std::size_t dropped_tasks() const noexcept
Return the number of tasks dropped by the overflow policy.
static TaskExecutor & get_instance()
Returns the global executor instance.

Returns the number of tasks dropped due to overflow.

Definition at line 2948 of file log_macros.hpp.

◆ LOGIT_GET_FLOAT_PARAM

#define LOGIT_GET_FLOAT_PARAM ( logger_index,
param )
Value:
double get_float_param(int logger_index, const LoggerParam &param) const
Retrieves a floating-point parameter from a logger.
Definition Logger.hpp:258

Retrieves floating-point parameter from a logger.

Parameters
logger_indexIndex of logger.
paramParameter to retrieve.
Returns
Requested parameter as a double.

Definition at line 2789 of file log_macros.hpp.

◆ LOGIT_GET_INT_PARAM

#define LOGIT_GET_INT_PARAM ( logger_index,
param )
Value:
int64_t get_int_param(int logger_index, const LoggerParam &param) const
Retrieves an integer parameter from a logger.
Definition Logger.hpp:244

Retrieves integer parameter from a logger.

Parameters
logger_indexIndex of logger.
paramParameter to retrieve.
Returns
Requested parameter as an integer.

Definition at line 2782 of file log_macros.hpp.

◆ LOGIT_GET_LAST_FILE_NAME

#define LOGIT_GET_LAST_FILE_NAME ( logger_index)
Value:
std::string get_string_param(int logger_index, const LoggerParam &param) const
Retrieves a string parameter from a logger.
Definition Logger.hpp:230
@ LastFileName
The name of the last file written to.

Retrieves last log file name from a specific logger.

Parameters
logger_indexIndex of logger.
Returns
Last file name written to.

Definition at line 2795 of file log_macros.hpp.

◆ LOGIT_GET_LAST_FILE_PATH

#define LOGIT_GET_LAST_FILE_PATH ( logger_index)
Value:
@ LastFilePath
The full path of the last file written to.

Retrieves last log file path from a specific logger.

Parameters
logger_indexIndex of logger.
Returns
Full path of last file written to.

Definition at line 2801 of file log_macros.hpp.

◆ LOGIT_GET_LAST_LOG_TIMESTAMP

#define LOGIT_GET_LAST_LOG_TIMESTAMP ( logger_index)
Value:

Retrieves timestamp of last log from a specific logger.

Parameters
logger_indexIndex of logger.
Returns
Timestamp of last log.

Definition at line 2807 of file log_macros.hpp.

◆ LOGIT_GET_LOG_LEVEL

#define LOGIT_GET_LOG_LEVEL ( logger_index)
Value:
LogLevel get_log_level(int logger_index) const
Retrieves the current minimal log level for a logger.
Definition Logger.hpp:369

Retrieves minimal log level for a specific logger.

Parameters
logger_indexIndex of logger.
Returns
Current minimum log level for the logger.

Definition at line 2910 of file log_macros.hpp.

◆ LOGIT_GET_LOG_READER

#define LOGIT_GET_LOG_READER ( logger_index)
Value:
Optional interface for backends that expose stored records.
#define LOGIT_GET_LOGGER_AS(logger_index, logger_type)
Retrieves a typed backend pointer from a logger by index.

Retrieves a read-only log-reader interface from a logger by index.

Parameters
logger_indexIndex of logger.
Returns
Pointer to ILogReader, or nullptr if the backend does not implement it.

Definition at line 2982 of file log_macros.hpp.

◆ LOGIT_GET_LOG_SUBSCRIBER

#define LOGIT_GET_LOG_SUBSCRIBER ( logger_index)
Value:
Optional interface for backends that can notify callers when a record is successfully written.

Retrieves a live-subscription interface from a logger by index.

Parameters
logger_indexIndex of logger.
Returns
Pointer to ILogSubscriber, or nullptr if the backend does not implement it.

Definition at line 3038 of file log_macros.hpp.

◆ LOGIT_GET_LOGGER_AS

#define LOGIT_GET_LOGGER_AS ( logger_index,
logger_type )
Value:
(::logit::Logger::get_instance().get_logger_as<logger_type>((logger_index)))
LoggerT * get_logger_as(int logger_index)
Retrieves a typed backend pointer from a logger by index.
Definition Logger.hpp:514

Retrieves a typed backend pointer from a logger by index.

Parameters
logger_indexIndex of logger.
logger_typeConcrete logger type (e.g., logit::MdbxLogger).
Returns
Pointer to the backend, or nullptr if index/type does not match.

Definition at line 2969 of file log_macros.hpp.

◆ LOGIT_GET_STRING_PARAM

#define LOGIT_GET_STRING_PARAM ( logger_index,
param )
Value:

Retrieves string parameter from a logger.

Parameters
logger_indexIndex of logger.
paramParameter to retrieve.
Returns
Requested parameter as a string.

Definition at line 2775 of file log_macros.hpp.

◆ LOGIT_GET_TIME_SINCE_LAST_LOG

#define LOGIT_GET_TIME_SINCE_LAST_LOG ( logger_index)
Value:
@ TimeSinceLastLog
The time elapsed since the last log in seconds.

Retrieves time since last log from a specific logger.

Parameters
logger_indexIndex of logger.
Returns
Time elapsed since last log in seconds.

Definition at line 2813 of file log_macros.hpp.

◆ LOGIT_INFO

#define LOGIT_INFO ( ...)
Value:
LOGIT_LOG_AND_RETURN(logit::LogLevel::LOG_LVL_INFO, {}, #__VA_ARGS__, __VA_ARGS__)

Definition at line 756 of file log_macros.hpp.

◆ LOGIT_INFO0

#define LOGIT_INFO0 ( )

◆ LOGIT_INFO0_IF

#define LOGIT_INFO0_IF ( condition)
Value:

Definition at line 1120 of file log_macros.hpp.

◆ LOGIT_INFO0_TO

#define LOGIT_INFO0_TO ( index)

◆ LOGIT_INFO_EVERY_N

#define LOGIT_INFO_EVERY_N ( n,
... )
Value:

Definition at line 1397 of file log_macros.hpp.

◆ LOGIT_INFO_IF

#define LOGIT_INFO_IF ( condition,
... )
Value:

Definition at line 1118 of file log_macros.hpp.

◆ LOGIT_INFO_ONCE

#define LOGIT_INFO_ONCE ( ...)
Value:

Definition at line 1390 of file log_macros.hpp.

◆ LOGIT_INFO_TAG

#define LOGIT_INFO_TAG ( msg,
... )
Value:
#define LOGIT_PRINT_INFO(...)

Definition at line 1413 of file log_macros.hpp.

◆ LOGIT_INFO_THROTTLE

#define LOGIT_INFO_THROTTLE ( p,
... )
Value:

Definition at line 1404 of file log_macros.hpp.

◆ LOGIT_INFO_TO

#define LOGIT_INFO_TO ( index,
... )
Value:
LOGIT_LOG_AND_RETURN_WITH_INDEX(logit::LogLevel::LOG_LVL_INFO, index, {}, #__VA_ARGS__, __VA_ARGS__)

Definition at line 773 of file log_macros.hpp.

◆ LOGIT_IS_LOGGER_ENABLED

#define LOGIT_IS_LOGGER_ENABLED ( logger_index)
Value:
bool is_logger_enabled(int logger_index) const
Checks if a logger is enabled.
Definition Logger.hpp:95

Checks if a logger is enabled.

Parameters
logger_indexIndex of logger.
Returns
True if enabled, false otherwise.

Definition at line 2881 of file log_macros.hpp.

◆ LOGIT_IS_SINGLE_MODE

#define LOGIT_IS_SINGLE_MODE ( logger_index)
Value:
bool is_logger_single_mode(int logger_index) const
Checks whether a logger is in single mode.
Definition Logger.hpp:153

Checks if a logger is in single mode.

Parameters
logger_indexIndex of logger.
Returns
True if in single mode, false otherwise.

Definition at line 2916 of file log_macros.hpp.

◆ LOGIT_LIST_LOG_FILES

#define LOGIT_LIST_LOG_FILES ( logger_index)
Value:
std::vector< LogFileInfo > list_log_files(int logger_index) const
Lists persisted log files exposed by a logger backend.
Definition Logger.hpp:299

Lists persisted log files for a specific file-based logger.

Parameters
logger_indexIndex of logger.
Returns
Metadata for persisted log files owned by the logger.

Definition at line 2831 of file log_macros.hpp.

◆ LOGIT_LOG_AND_RETURN

#define LOGIT_LOG_AND_RETURN ( level,
format,
arg_names,
... )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, format, arg_names, -1, false}, __VA_ARGS__); \
} while (0)
#define LOGIT_CURRENT_TIMESTAMP_MS()
Macro to get the current timestamp in milliseconds.
Definition config.hpp:84
#define LOGIT_BASE_PATH
Defines the base path used for log file paths.
Definition config.hpp:14
Stores log metadata and content.
Definition LogRecord.hpp:17

Logs a message with arguments.

Parameters
levelThe log level.
formatThe log message format.
arg_namesThe names of the arguments.
...The arguments to log.

Definition at line 521 of file log_macros.hpp.

◆ LOGIT_LOG_AND_RETURN_FMT

#define LOGIT_LOG_AND_RETURN_FMT ( level,
format,
arg_names,
... )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, format, arg_names, -1, false, true}, __VA_ARGS__); \
} while (0)

Definition at line 617 of file log_macros.hpp.

◆ LOGIT_LOG_AND_RETURN_FMT_WITH_INDEX

#define LOGIT_LOG_AND_RETURN_FMT_WITH_INDEX ( level,
index,
format,
arg_names,
... )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, format, arg_names, index, false, true}, __VA_ARGS__); \
} while (0)

Definition at line 636 of file log_macros.hpp.

◆ LOGIT_LOG_AND_RETURN_NOARGS

#define LOGIT_LOG_AND_RETURN_NOARGS ( level,
format )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, format, {}, -1, false}); \
} while (0)

Logs a message without arguments.

Parameters
levelThe log level.
formatThe log message format.

Definition at line 471 of file log_macros.hpp.

◆ LOGIT_LOG_AND_RETURN_NOARGS_WITH_INDEX

#define LOGIT_LOG_AND_RETURN_NOARGS_WITH_INDEX ( level,
index,
format )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, format, {}, index}); \
} while (0)

Logs a message to a specific logger without arguments.

Parameters
levelThe log level.
indexThe index of the logger to log to.
formatThe log message format.

Definition at line 494 of file log_macros.hpp.

◆ LOGIT_LOG_AND_RETURN_PRINT

#define LOGIT_LOG_AND_RETURN_PRINT ( level,
arg_names,
... )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, {}, arg_names, -1, true}, __VA_ARGS__); \
} while (0)

Logs a message with arguments, but prints them without using a format string.

Parameters
levelThe log level.
arg_namesThe names of the arguments.
...The arguments to log.

This macro logs the raw arguments without applying any formatting to them.

Definition at line 545 of file log_macros.hpp.

◆ LOGIT_LOG_AND_RETURN_PRINT_WITH_INDEX

#define LOGIT_LOG_AND_RETURN_PRINT_WITH_INDEX ( level,
index,
arg_names,
... )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, {}, arg_names, index, true}, __VA_ARGS__); \
} while (0)

Logs a message with arguments to a specific logger, but prints them without using a format string.

Parameters
levelThe log level.
indexThe index of the logger to log to.
arg_namesThe 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 595 of file log_macros.hpp.

◆ LOGIT_LOG_AND_RETURN_WITH_INDEX

#define LOGIT_LOG_AND_RETURN_WITH_INDEX ( level,
index,
format,
arg_names,
... )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, format, arg_names, index, false}, __VA_ARGS__); \
} while (0)

Logs a message with arguments to a specific logger.

Parameters
levelThe log level.
indexThe index of the logger to log to.
formatThe log message format.
arg_namesThe names of the arguments.
...The arguments to log.

Definition at line 570 of file log_macros.hpp.

◆ LOGIT_NOARGS_DEBUG

#define LOGIT_NOARGS_DEBUG ( )

◆ LOGIT_NOARGS_DEBUG_IF

#define LOGIT_NOARGS_DEBUG_IF ( condition)

◆ LOGIT_NOARGS_DEBUG_TO

#define LOGIT_NOARGS_DEBUG_TO ( index)

◆ LOGIT_NOARGS_ERROR

#define LOGIT_NOARGS_ERROR ( )

◆ LOGIT_NOARGS_ERROR_IF

#define LOGIT_NOARGS_ERROR_IF ( condition)

◆ LOGIT_NOARGS_ERROR_TO

#define LOGIT_NOARGS_ERROR_TO ( index)

◆ LOGIT_NOARGS_FATAL

#define LOGIT_NOARGS_FATAL ( )

◆ LOGIT_NOARGS_FATAL_IF

#define LOGIT_NOARGS_FATAL_IF ( condition)

◆ LOGIT_NOARGS_FATAL_TO

#define LOGIT_NOARGS_FATAL_TO ( index)

◆ LOGIT_NOARGS_INFO

#define LOGIT_NOARGS_INFO ( )

◆ LOGIT_NOARGS_INFO_IF

#define LOGIT_NOARGS_INFO_IF ( condition)
Value:

Definition at line 1126 of file log_macros.hpp.

◆ LOGIT_NOARGS_INFO_TO

#define LOGIT_NOARGS_INFO_TO ( index)

◆ LOGIT_NOARGS_TRACE

#define LOGIT_NOARGS_TRACE ( )

◆ LOGIT_NOARGS_TRACE_IF

#define LOGIT_NOARGS_TRACE_IF ( condition)

◆ LOGIT_NOARGS_TRACE_TO

#define LOGIT_NOARGS_TRACE_TO ( index)

◆ LOGIT_NOARGS_WARN

#define LOGIT_NOARGS_WARN ( )

◆ LOGIT_NOARGS_WARN_IF

#define LOGIT_NOARGS_WARN_IF ( condition)
Value:

Definition at line 1224 of file log_macros.hpp.

◆ LOGIT_NOARGS_WARN_TO

#define LOGIT_NOARGS_WARN_TO ( index)

◆ LOGIT_ONCE

#define LOGIT_ONCE ( level,
... )
Value:
do { \
static bool LOGIT_CONCAT(_logit_once_, __LINE__) = false; \
if (!LOGIT_CONCAT(_logit_once_, __LINE__)) { \
LOGIT_CONCAT(_logit_once_, __LINE__) = true; \
LOGIT_LOG_AND_RETURN(level, {}, #__VA_ARGS__, __VA_ARGS__); \
} \
} while (0)

Definition at line 1361 of file log_macros.hpp.

◆ LOGIT_PRINT_DEBUG

#define LOGIT_PRINT_DEBUG ( ...)
Value:

Definition at line 815 of file log_macros.hpp.

◆ LOGIT_PRINT_DEBUG_IF

#define LOGIT_PRINT_DEBUG_IF ( condition,
... )
Value:
logit::LogLevel::LOG_LVL_DEBUG, condition, __VA_ARGS__)
#define LOGIT_DETAIL_CONDITIONAL_PRINT(level, condition,...)

Definition at line 1180 of file log_macros.hpp.

◆ LOGIT_PRINT_DEBUG_TO

#define LOGIT_PRINT_DEBUG_TO ( index,
... )
Value:
#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.

Definition at line 832 of file log_macros.hpp.

◆ LOGIT_PRINT_ERROR

#define LOGIT_PRINT_ERROR ( ...)
Value:

Definition at line 921 of file log_macros.hpp.

◆ LOGIT_PRINT_ERROR_IF

#define LOGIT_PRINT_ERROR_IF ( condition,
... )
Value:

Definition at line 1278 of file log_macros.hpp.

◆ LOGIT_PRINT_ERROR_TO

#define LOGIT_PRINT_ERROR_TO ( index,
... )
Value:

Definition at line 938 of file log_macros.hpp.

◆ LOGIT_PRINT_FATAL

#define LOGIT_PRINT_FATAL ( ...)
Value:

Definition at line 974 of file log_macros.hpp.

◆ LOGIT_PRINT_FATAL_IF

#define LOGIT_PRINT_FATAL_IF ( condition,
... )
Value:

Definition at line 1327 of file log_macros.hpp.

◆ LOGIT_PRINT_FATAL_TO

#define LOGIT_PRINT_FATAL_TO ( index,
... )
Value:

Definition at line 991 of file log_macros.hpp.

◆ LOGIT_PRINT_INFO

#define LOGIT_PRINT_INFO ( ...)
Value:

Definition at line 762 of file log_macros.hpp.

◆ LOGIT_PRINT_INFO_IF

#define LOGIT_PRINT_INFO_IF ( condition,
... )
Value:

Definition at line 1131 of file log_macros.hpp.

◆ LOGIT_PRINT_INFO_TO

#define LOGIT_PRINT_INFO_TO ( index,
... )
Value:

Definition at line 779 of file log_macros.hpp.

◆ LOGIT_PRINT_TRACE

#define LOGIT_PRINT_TRACE ( ...)
Value:

Definition at line 709 of file log_macros.hpp.

◆ LOGIT_PRINT_TRACE_IF

#define LOGIT_PRINT_TRACE_IF ( condition,
... )
Value:

Definition at line 1082 of file log_macros.hpp.

◆ LOGIT_PRINT_TRACE_TO

#define LOGIT_PRINT_TRACE_TO ( index,
... )
Value:

Definition at line 726 of file log_macros.hpp.

◆ LOGIT_PRINT_WARN

#define LOGIT_PRINT_WARN ( ...)
Value:

Definition at line 868 of file log_macros.hpp.

◆ LOGIT_PRINT_WARN_IF

#define LOGIT_PRINT_WARN_IF ( condition,
... )
Value:

Definition at line 1229 of file log_macros.hpp.

◆ LOGIT_PRINT_WARN_TO

#define LOGIT_PRINT_WARN_TO ( index,
... )
Value:

Definition at line 885 of file log_macros.hpp.

◆ LOGIT_PRINTF_DEBUG

#define LOGIT_PRINTF_DEBUG ( fmt,
... )
Value:

Definition at line 816 of file log_macros.hpp.

◆ LOGIT_PRINTF_DEBUG_IF

#define LOGIT_PRINTF_DEBUG_IF ( condition,
fmt,
... )
Value:
logit::LogLevel::LOG_LVL_DEBUG, condition, fmt, __VA_ARGS__)
#define LOGIT_DETAIL_CONDITIONAL_PRINTF(level, condition, fmt,...)

Definition at line 1183 of file log_macros.hpp.

◆ LOGIT_PRINTF_DEBUG_TO

#define LOGIT_PRINTF_DEBUG_TO ( index,
fmt,
... )
Value:

Definition at line 833 of file log_macros.hpp.

◆ LOGIT_PRINTF_ERROR

#define LOGIT_PRINTF_ERROR ( fmt,
... )
Value:

Definition at line 922 of file log_macros.hpp.

◆ LOGIT_PRINTF_ERROR_IF

#define LOGIT_PRINTF_ERROR_IF ( condition,
fmt,
... )
Value:

Definition at line 1281 of file log_macros.hpp.

◆ LOGIT_PRINTF_ERROR_TO

#define LOGIT_PRINTF_ERROR_TO ( index,
fmt,
... )
Value:

Definition at line 939 of file log_macros.hpp.

◆ LOGIT_PRINTF_FATAL

#define LOGIT_PRINTF_FATAL ( fmt,
... )
Value:

Definition at line 975 of file log_macros.hpp.

◆ LOGIT_PRINTF_FATAL_IF

#define LOGIT_PRINTF_FATAL_IF ( condition,
fmt,
... )
Value:

Definition at line 1330 of file log_macros.hpp.

◆ LOGIT_PRINTF_FATAL_TO

#define LOGIT_PRINTF_FATAL_TO ( index,
fmt,
... )
Value:

Definition at line 992 of file log_macros.hpp.

◆ LOGIT_PRINTF_INFO

#define LOGIT_PRINTF_INFO ( fmt,
... )
Value:

Definition at line 763 of file log_macros.hpp.

◆ LOGIT_PRINTF_INFO_IF

#define LOGIT_PRINTF_INFO_IF ( condition,
fmt,
... )
Value:

Definition at line 1134 of file log_macros.hpp.

◆ LOGIT_PRINTF_INFO_TO

#define LOGIT_PRINTF_INFO_TO ( index,
fmt,
... )
Value:

Definition at line 780 of file log_macros.hpp.

◆ LOGIT_PRINTF_TRACE

#define LOGIT_PRINTF_TRACE ( fmt,
... )
Value:

Definition at line 710 of file log_macros.hpp.

◆ LOGIT_PRINTF_TRACE_IF

#define LOGIT_PRINTF_TRACE_IF ( condition,
fmt,
... )
Value:

Definition at line 1085 of file log_macros.hpp.

◆ LOGIT_PRINTF_TRACE_TO

#define LOGIT_PRINTF_TRACE_TO ( index,
fmt,
... )
Value:

Definition at line 727 of file log_macros.hpp.

◆ LOGIT_PRINTF_WARN

#define LOGIT_PRINTF_WARN ( fmt,
... )
Value:

Definition at line 869 of file log_macros.hpp.

◆ LOGIT_PRINTF_WARN_IF

#define LOGIT_PRINTF_WARN_IF ( condition,
fmt,
... )
Value:

Definition at line 1232 of file log_macros.hpp.

◆ LOGIT_PRINTF_WARN_TO

#define LOGIT_PRINTF_WARN_TO ( index,
fmt,
... )
Value:

Definition at line 886 of file log_macros.hpp.

◆ LOGIT_QUEUE_BLOCK

#define LOGIT_QUEUE_BLOCK   logit::QueuePolicy::Block

Queue policy for blocking when the queue is full.

Definition at line 2940 of file log_macros.hpp.

◆ LOGIT_QUEUE_DROP

#define LOGIT_QUEUE_DROP   LOGIT_QUEUE_DROP_NEWEST

Backward-compatible alias for dropping the newest task.

Definition at line 2937 of file log_macros.hpp.

◆ LOGIT_QUEUE_DROP_NEWEST

#define LOGIT_QUEUE_DROP_NEWEST   logit::QueuePolicy::DropNewest

Queue policy for dropping the newest task when the queue is full.

Definition at line 2931 of file log_macros.hpp.

◆ LOGIT_QUEUE_DROP_OLDEST

#define LOGIT_QUEUE_DROP_OLDEST   logit::QueuePolicy::DropOldest

Queue policy for dropping the oldest task when the queue is full.

Definition at line 2934 of file log_macros.hpp.

◆ LOGIT_RAW

#define LOGIT_RAW ( message)
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, message, {}, -1, false, false, true}); \
} while (0)

Logs an already formatted raw message without applying logger formatter patterns or level filters.

Parameters
messageRaw message text.

Definition at line 650 of file log_macros.hpp.

◆ LOGIT_RAW_IF

#define LOGIT_RAW_IF ( condition,
message )
Value:
do { \
if (condition) { \
LOGIT_RAW(message); \
} \
} while (0)

Logs a raw message when the condition is true.

Parameters
conditionCondition controlling emission.
messageRaw message text.

Definition at line 672 of file log_macros.hpp.

◆ LOGIT_RAW_TO

#define LOGIT_RAW_TO ( index,
message )
Value:
do { \
logit::Logger::get_instance().log_and_return( \
logit::make_relative(__FILE__, LOGIT_BASE_PATH), __LINE__, \
LOGIT_FUNCTION, message, {}, index, false, false, true}); \
} while (0)

Logs an already formatted raw message to a specific logger.

Parameters
indexLogger index.
messageRaw message text.

Definition at line 661 of file log_macros.hpp.

◆ LOGIT_READ_LOG_FILE

#define LOGIT_READ_LOG_FILE ( logger_index,
path )
Value:
LogFileReadResult read_log_file(int logger_index, const std::string &path) const
Reads one persisted log file exposed by a logger backend.
Definition Logger.hpp:314

Reads one persisted log file from a specific file-based logger.

Parameters
logger_indexIndex of logger.
pathFull path returned by LOGIT_LIST_LOG_FILES.
Returns
Read result with metadata, content and success flag.

Definition at line 2838 of file log_macros.hpp.

◆ LOGIT_READ_LOG_FILES

#define LOGIT_READ_LOG_FILES ( logger_index,
paths )
Value:
std::vector< LogFileReadResult > read_log_files(int logger_index, const std::vector< std::string > &paths) const
Reads several persisted log files exposed by a logger backend.
Definition Logger.hpp:337

Reads several persisted log files from a specific file-based logger.

Parameters
logger_indexIndex of logger.
pathsFull paths returned by LOGIT_LIST_LOG_FILES.
Returns
Per-file read results in the same order as the requested paths.

Definition at line 2845 of file log_macros.hpp.

◆ LOGIT_READ_RANGE

#define LOGIT_READ_RANGE ( logger_index,
from_ms,
to_ms,
limit )
Value:
([](int _idx, int64_t _from, int64_t _to, std::size_t _limit) { \
auto* _reader = LOGIT_GET_LOG_READER(_idx); \
return _reader \
? _reader->read_range(_from, _to, _limit) \
: std::vector<::logit::LogRecordSnapshot>{}; \
}((logger_index), (from_ms), (to_ms), (limit)))
#define LOGIT_GET_LOG_READER(logger_index)
Retrieves a read-only log-reader interface from a logger by index.

Reads a time-range of records from a backend that supports ILogReader.

Parameters
logger_indexIndex of logger.
from_msInclusive start timestamp.
to_msExclusive end timestamp.
limitMaximum number of records (0 = unlimited).
Returns
Matching records, or empty vector if backend does not support reading.

Definition at line 2997 of file log_macros.hpp.

◆ LOGIT_READ_RECENT

#define LOGIT_READ_RECENT ( logger_index,
limit,
period_ms,
order )
Value:
([](int _idx, std::size_t _limit, int64_t _period_ms, ::logit::LogReadOrder _order) { \
auto* _reader = LOGIT_GET_LOG_READER(_idx); \
return _reader \
? _reader->read_recent(_limit, _period_ms, _order) \
: std::vector<::logit::LogRecordSnapshot>{}; \
}((logger_index), (limit), (period_ms), (order)))
LogReadOrder
Ordering for query results returned by ILogReader.

Reads recent records from a backend that supports ILogReader.

Parameters
logger_indexIndex of logger.
limitMaximum number of records (0 = unlimited).
period_msTime window in milliseconds from now backward (0 = unlimited).
orderAscending or descending result order.
Returns
Matching records, or empty vector if backend does not support reading.

Definition at line 3011 of file log_macros.hpp.

◆ LOGIT_READ_RECENT_ASC

#define LOGIT_READ_RECENT_ASC ( logger_index,
limit,
period_ms )
Value:
LOGIT_READ_RECENT((logger_index), (limit), (period_ms), ::logit::LogReadOrder::Ascending)
#define LOGIT_READ_RECENT(logger_index, limit, period_ms, order)
Reads recent records from a backend that supports ILogReader.
@ Ascending
Oldest first.

Reads recent records in ascending order (oldest first).

Parameters
logger_indexIndex of logger.
limitMaximum number of records (0 = unlimited).
period_msTime window in milliseconds from now backward (0 = unlimited).
Returns
Matching records in ascending order, or empty vector if backend does not support reading.

Definition at line 3024 of file log_macros.hpp.

◆ LOGIT_READ_RECENT_DESC

#define LOGIT_READ_RECENT_DESC ( logger_index,
limit,
period_ms )
Value:
LOGIT_READ_RECENT((logger_index), (limit), (period_ms), ::logit::LogReadOrder::Descending)
@ Descending
Newest first.

Reads recent records in descending order (newest first).

Parameters
logger_indexIndex of logger.
limitMaximum number of records (0 = unlimited).
period_msTime window in milliseconds from now backward (0 = unlimited).
Returns
Matching records in descending order, or empty vector if backend does not support reading.

Definition at line 3032 of file log_macros.hpp.

◆ LOGIT_REMOVE_LOG_CALLBACK

#define LOGIT_REMOVE_LOG_CALLBACK ( logger_index,
callback_id )
Value:
([](int _idx, uint64_t _id) -> bool { \
auto* _subscriber = LOGIT_GET_LOG_SUBSCRIBER(_idx); \
return _subscriber ? _subscriber->remove_log_callback(_id) : false; \
}((logger_index), (callback_id)))

Unregisters a previously added log callback.

Parameters
logger_indexIndex of logger.
callback_idId returned by LOGIT_ADD_LOG_CALLBACK.
Returns
True if the callback was found and removed.

Definition at line 3061 of file log_macros.hpp.

◆ LOGIT_RESET_DROPPED_TASKS

#define LOGIT_RESET_DROPPED_TASKS ( )
Value:
void reset_dropped_tasks() noexcept
Reset the overflow counter to zero.

Resets the dropped-tasks counter to zero.

Definition at line 2952 of file log_macros.hpp.

◆ LOGIT_SCOPE_DEBUG

#define LOGIT_SCOPE_DEBUG ( phase)
Value:
#define LOGIT_DETAIL_SCOPE(level, phase)

Definition at line 289 of file log_macros.hpp.

◆ LOGIT_SCOPE_DEBUG_T

#define LOGIT_SCOPE_DEBUG_T ( threshold_ms,
phase )
Value:
#define LOGIT_DETAIL_SCOPE_T(level, threshold_ms, phase)

Definition at line 290 of file log_macros.hpp.

◆ LOGIT_SCOPE_ERROR

#define LOGIT_SCOPE_ERROR ( phase)
Value:

Definition at line 316 of file log_macros.hpp.

◆ LOGIT_SCOPE_ERROR_T

#define LOGIT_SCOPE_ERROR_T ( threshold_ms,
phase )
Value:

Definition at line 317 of file log_macros.hpp.

◆ LOGIT_SCOPE_FATAL

#define LOGIT_SCOPE_FATAL ( phase)
Value:

Definition at line 325 of file log_macros.hpp.

◆ LOGIT_SCOPE_FATAL_T

#define LOGIT_SCOPE_FATAL_T ( threshold_ms,
phase )
Value:

Definition at line 326 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_DEBUG

#define LOGIT_SCOPE_FMT_DEBUG ( fmt_str,
... )
Value:
#define LOGIT_DETAIL_SCOPE_FMT(level, fmt_str,...)

Definition at line 404 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_DEBUG_T

#define LOGIT_SCOPE_FMT_DEBUG_T ( threshold_ms,
fmt_str,
... )
Value:
LOGIT_DETAIL_SCOPE_FMT_T(::logit::LogLevel::LOG_LVL_DEBUG, threshold_ms, fmt_str, __VA_ARGS__)
#define LOGIT_DETAIL_SCOPE_FMT_T(level, threshold_ms, fmt_str,...)

Definition at line 406 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_ERROR

#define LOGIT_SCOPE_FMT_ERROR ( fmt_str,
... )
Value:

Definition at line 434 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_ERROR_T

#define LOGIT_SCOPE_FMT_ERROR_T ( threshold_ms,
fmt_str,
... )
Value:
LOGIT_DETAIL_SCOPE_FMT_T(::logit::LogLevel::LOG_LVL_ERROR, threshold_ms, fmt_str, __VA_ARGS__)

Definition at line 436 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_FATAL

#define LOGIT_SCOPE_FMT_FATAL ( fmt_str,
... )
Value:

Definition at line 444 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_FATAL_T

#define LOGIT_SCOPE_FMT_FATAL_T ( threshold_ms,
fmt_str,
... )
Value:
LOGIT_DETAIL_SCOPE_FMT_T(::logit::LogLevel::LOG_LVL_FATAL, threshold_ms, fmt_str, __VA_ARGS__)

Definition at line 446 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_INFO

#define LOGIT_SCOPE_FMT_INFO ( fmt_str,
... )
Value:

Definition at line 414 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_INFO_T

#define LOGIT_SCOPE_FMT_INFO_T ( threshold_ms,
fmt_str,
... )
Value:
LOGIT_DETAIL_SCOPE_FMT_T(::logit::LogLevel::LOG_LVL_INFO, threshold_ms, fmt_str, __VA_ARGS__)

Definition at line 416 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_TRACE

#define LOGIT_SCOPE_FMT_TRACE ( fmt_str,
... )
Value:

Definition at line 394 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_TRACE_T

#define LOGIT_SCOPE_FMT_TRACE_T ( threshold_ms,
fmt_str,
... )
Value:
LOGIT_DETAIL_SCOPE_FMT_T(::logit::LogLevel::LOG_LVL_TRACE, threshold_ms, fmt_str, __VA_ARGS__)

Definition at line 396 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_WARN

#define LOGIT_SCOPE_FMT_WARN ( fmt_str,
... )
Value:

Definition at line 424 of file log_macros.hpp.

◆ LOGIT_SCOPE_FMT_WARN_T

#define LOGIT_SCOPE_FMT_WARN_T ( threshold_ms,
fmt_str,
... )
Value:
LOGIT_DETAIL_SCOPE_FMT_T(::logit::LogLevel::LOG_LVL_WARN, threshold_ms, fmt_str, __VA_ARGS__)

Definition at line 426 of file log_macros.hpp.

◆ LOGIT_SCOPE_INFO

#define LOGIT_SCOPE_INFO ( phase)
Value:

Definition at line 298 of file log_macros.hpp.

◆ LOGIT_SCOPE_INFO_T

#define LOGIT_SCOPE_INFO_T ( threshold_ms,
phase )
Value:

Definition at line 299 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_DEBUG

#define LOGIT_SCOPE_PRINTF_DEBUG ( fmt_str,
... )
Value:
#define LOGIT_DETAIL_SCOPE_PRINTF(level, fmt_str,...)

Definition at line 344 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_DEBUG_T

#define LOGIT_SCOPE_PRINTF_DEBUG_T ( threshold_ms,
fmt_str,
... )
Value:
#define LOGIT_DETAIL_SCOPE_PRINTF_T(level, threshold_ms, fmt_str,...)

Definition at line 346 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_ERROR

#define LOGIT_SCOPE_PRINTF_ERROR ( fmt_str,
... )
Value:

Definition at line 374 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_ERROR_T

#define LOGIT_SCOPE_PRINTF_ERROR_T ( threshold_ms,
fmt_str,
... )
Value:

Definition at line 376 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_FATAL

#define LOGIT_SCOPE_PRINTF_FATAL ( fmt_str,
... )
Value:

Definition at line 384 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_FATAL_T

#define LOGIT_SCOPE_PRINTF_FATAL_T ( threshold_ms,
fmt_str,
... )
Value:

Definition at line 386 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_INFO

#define LOGIT_SCOPE_PRINTF_INFO ( fmt_str,
... )
Value:

Definition at line 354 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_INFO_T

#define LOGIT_SCOPE_PRINTF_INFO_T ( threshold_ms,
fmt_str,
... )
Value:
LOGIT_DETAIL_SCOPE_PRINTF_T(::logit::LogLevel::LOG_LVL_INFO, threshold_ms, fmt_str, __VA_ARGS__)

Definition at line 356 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_TRACE

#define LOGIT_SCOPE_PRINTF_TRACE ( fmt_str,
... )
Value:

Definition at line 334 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_TRACE_T

#define LOGIT_SCOPE_PRINTF_TRACE_T ( threshold_ms,
fmt_str,
... )
Value:

Definition at line 336 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_WARN

#define LOGIT_SCOPE_PRINTF_WARN ( fmt_str,
... )
Value:

Definition at line 364 of file log_macros.hpp.

◆ LOGIT_SCOPE_PRINTF_WARN_T

#define LOGIT_SCOPE_PRINTF_WARN_T ( threshold_ms,
fmt_str,
... )
Value:
LOGIT_DETAIL_SCOPE_PRINTF_T(::logit::LogLevel::LOG_LVL_WARN, threshold_ms, fmt_str, __VA_ARGS__)

Definition at line 366 of file log_macros.hpp.

◆ LOGIT_SCOPE_TRACE

#define LOGIT_SCOPE_TRACE ( phase)
Value:

Definition at line 280 of file log_macros.hpp.

◆ LOGIT_SCOPE_TRACE_T

#define LOGIT_SCOPE_TRACE_T ( threshold_ms,
phase )
Value:

Definition at line 281 of file log_macros.hpp.

◆ LOGIT_SCOPE_WARN

#define LOGIT_SCOPE_WARN ( phase)
Value:

Definition at line 307 of file log_macros.hpp.

◆ LOGIT_SCOPE_WARN_T

#define LOGIT_SCOPE_WARN_T ( threshold_ms,
phase )
Value:

Definition at line 308 of file log_macros.hpp.

◆ LOGIT_SECTION

#define LOGIT_SECTION ( name)
Value:
#define LOGIT_RAW(message)
Logs an already formatted raw message without applying logger formatter patterns or level filters.
std::string make_section(const T &name)
Format a raw section name as [name].
Definition tag_utils.hpp:86

Logs a raw section header in [name] form.

Parameters
nameSection name.

Definition at line 681 of file log_macros.hpp.

◆ LOGIT_SECTION_IF

#define LOGIT_SECTION_IF ( condition,
name )
Value:
do { \
if (condition) { \
LOGIT_SECTION(name); \
} \
} while (0)

Logs a raw section header when the condition is true.

Parameters
conditionCondition controlling emission.
nameSection name.

Definition at line 691 of file log_macros.hpp.

◆ LOGIT_SECTION_TO

#define LOGIT_SECTION_TO ( index,
name )
Value:
#define LOGIT_RAW_TO(index, message)
Logs an already formatted raw message to a specific logger.

Logs a raw section header to a specific logger.

Parameters
indexLogger index.
nameSection name.

Definition at line 686 of file log_macros.hpp.

◆ LOGIT_SET_LOG_LEVEL

#define LOGIT_SET_LOG_LEVEL ( level)
Value:
void set_log_level(LogLevel level)
Sets minimal log level for all loggers.
Definition Logger.hpp:128

Sets minimal log level for all loggers.

Parameters
levelMinimum log level.

Definition at line 2904 of file log_macros.hpp.

◆ LOGIT_SET_LOG_LEVEL_TO

#define LOGIT_SET_LOG_LEVEL_TO ( logger_index,
level )
Value:

Sets minimal log level for a specific logger.

Parameters
logger_indexIndex of logger.
levelMinimum log level.

Definition at line 2899 of file log_macros.hpp.

◆ LOGIT_SET_LOGGER_ENABLED

#define LOGIT_SET_LOGGER_ENABLED ( logger_index,
enabled )
Value:
void set_logger_enabled(int logger_index, bool enabled)
Enables or disables a logger by index.
Definition Logger.hpp:84

Enables or disables a logger.

Parameters
logger_indexIndex of logger.
enabledTrue to enable, false to disable.

Definition at line 2875 of file log_macros.hpp.

◆ LOGIT_SET_MAX_QUEUE

#define LOGIT_SET_MAX_QUEUE ( size)
Value:
void set_max_queue_size(std::size_t size)
Update the maximum queue size (0 disables the limit).

Sets the maximum number of queued tasks.

Parameters
sizeMaximum queue size (0 for unlimited).

Definition at line 2927 of file log_macros.hpp.

◆ LOGIT_SET_QUEUE_POLICY

#define LOGIT_SET_QUEUE_POLICY ( mode)
Value:
void set_queue_policy(QueuePolicy policy)
Change the overflow policy for newly submitted tasks.

Sets the behavior when the queue is full.

Parameters
modeLOGIT_QUEUE_DROP_NEWEST, LOGIT_QUEUE_DROP_OLDEST or LOGIT_QUEUE_BLOCK.

Definition at line 2944 of file log_macros.hpp.

◆ LOGIT_SET_SINGLE_MODE

#define LOGIT_SET_SINGLE_MODE ( logger_index,
single_mode )
Value:
void set_logger_single_mode(int logger_index, bool single_mode)
Sets single-mode flag for a logger.
Definition Logger.hpp:106

Sets single mode for a specific logger.

Parameters
logger_indexIndex of logger.
single_modeTrue to enable single mode, false otherwise.

Definition at line 2887 of file log_macros.hpp.

◆ LOGIT_SET_TIME_OFFSET

#define LOGIT_SET_TIME_OFFSET ( logger_index,
offset_ms )
Value:
void set_timestamp_offset(int logger_index, int64_t offset_ms)
Sets timestamp offset for a specific logger.
Definition Logger.hpp:117

Sets timestamp offset for a specific logger.

Parameters
logger_indexIndex of logger.
offset_msOffset in milliseconds.

Definition at line 2893 of file log_macros.hpp.

◆ LOGIT_SHUTDOWN

#define LOGIT_SHUTDOWN ( )
Value:
void shutdown()
Shuts down logger system.
Definition Logger.hpp:534

Macro for shutting down logger system.

Definition at line 2961 of file log_macros.hpp.

◆ LOGIT_STREAM

#define LOGIT_STREAM ( level)
Value:
A stream-based logger that collects log messages using the << operator.
Definition LogStream.hpp:17
std::string make_relative(const std::string &file_path, const std::string &base_path)
Computes the relative path from base_path to file_path.

Begin a log stream for the specified log level.

Definition at line 209 of file log_macros.hpp.

◆ LOGIT_STREAM_DEBUG

#define LOGIT_STREAM_DEBUG ( )
Value:
#define LOGIT_STREAM(level)
Begin a log stream for the specified log level.

Definition at line 217 of file log_macros.hpp.

◆ LOGIT_STREAM_DEBUG_TO

#define LOGIT_STREAM_DEBUG_TO ( index)
Value:
#define LOGIT_STREAM_WITH_INDEX(level, index)
Begin a log stream for the specified log level, targeting a specific logger.

Definition at line 224 of file log_macros.hpp.

◆ LOGIT_STREAM_ERROR

#define LOGIT_STREAM_ERROR ( )
Value:

Definition at line 220 of file log_macros.hpp.

◆ LOGIT_STREAM_ERROR_TO

#define LOGIT_STREAM_ERROR_TO ( index)
Value:

Definition at line 227 of file log_macros.hpp.

◆ LOGIT_STREAM_FATAL

#define LOGIT_STREAM_FATAL ( )
Value:

Definition at line 221 of file log_macros.hpp.

◆ LOGIT_STREAM_FATAL_TO

#define LOGIT_STREAM_FATAL_TO ( index)
Value:

Definition at line 228 of file log_macros.hpp.

◆ LOGIT_STREAM_INFO

#define LOGIT_STREAM_INFO ( )
Value:

Definition at line 218 of file log_macros.hpp.

◆ LOGIT_STREAM_INFO_TO

#define LOGIT_STREAM_INFO_TO ( index)
Value:

Definition at line 225 of file log_macros.hpp.

◆ LOGIT_STREAM_TRACE

#define LOGIT_STREAM_TRACE ( )
Value:

Definition at line 216 of file log_macros.hpp.

◆ LOGIT_STREAM_TRACE_TO

#define LOGIT_STREAM_TRACE_TO ( index)
Value:

Definition at line 223 of file log_macros.hpp.

◆ LOGIT_STREAM_WARN

#define LOGIT_STREAM_WARN ( )
Value:

Definition at line 219 of file log_macros.hpp.

◆ LOGIT_STREAM_WARN_TO

#define LOGIT_STREAM_WARN_TO ( index)
Value:

Definition at line 226 of file log_macros.hpp.

◆ LOGIT_STREAM_WITH_INDEX

#define LOGIT_STREAM_WITH_INDEX ( level,
index )
Value:

Begin a log stream for the specified log level, targeting a specific logger.

Definition at line 213 of file log_macros.hpp.

◆ LOGIT_TAG

#define LOGIT_TAG ( k,
v )
Value:
std::pair< std::string, std::string > make_tag(std::string key, std::string value)
Create tag from string key and value.
Definition tag_utils.hpp:30

Definition at line 1409 of file log_macros.hpp.

◆ LOGIT_THROTTLE

#define LOGIT_THROTTLE ( level,
period_ms,
... )
Value:
do { \
static int64_t LOGIT_CONCAT(_logit_last_, __LINE__) = 0; \
int64_t _logit_now = LOGIT_MONOTONIC_MS(); \
if (_logit_now - LOGIT_CONCAT(_logit_last_, __LINE__) >= (period_ms)) { \
LOGIT_CONCAT(_logit_last_, __LINE__) = _logit_now; \
LOGIT_LOG_AND_RETURN(level, {}, #__VA_ARGS__, __VA_ARGS__); \
} \
} while (0)
#define LOGIT_MONOTONIC_MS()
Definition config.hpp:74

Definition at line 1378 of file log_macros.hpp.

◆ LOGIT_TRACE

#define LOGIT_TRACE ( ...)
Value:

Definition at line 703 of file log_macros.hpp.

◆ LOGIT_TRACE0

#define LOGIT_TRACE0 ( )

◆ LOGIT_TRACE0_IF

#define LOGIT_TRACE0_IF ( condition)

◆ LOGIT_TRACE0_TO

#define LOGIT_TRACE0_TO ( index)

◆ LOGIT_TRACE_EVERY_N

#define LOGIT_TRACE_EVERY_N ( n,
... )
Value:

Definition at line 1395 of file log_macros.hpp.

◆ LOGIT_TRACE_IF

#define LOGIT_TRACE_IF ( condition,
... )
Value:

Definition at line 1069 of file log_macros.hpp.

◆ LOGIT_TRACE_ONCE

#define LOGIT_TRACE_ONCE ( ...)
Value:

Definition at line 1388 of file log_macros.hpp.

◆ LOGIT_TRACE_TAG

#define LOGIT_TRACE_TAG ( msg,
... )
Value:
#define LOGIT_PRINT_TRACE(...)

Definition at line 1411 of file log_macros.hpp.

◆ LOGIT_TRACE_THROTTLE

#define LOGIT_TRACE_THROTTLE ( p,
... )
Value:

Definition at line 1402 of file log_macros.hpp.

◆ LOGIT_TRACE_TO

#define LOGIT_TRACE_TO ( index,
... )
Value:

Definition at line 720 of file log_macros.hpp.

◆ LOGIT_WAIT

#define LOGIT_WAIT ( )
Value:
void wait()
Waits for all asynchronous loggers to finish processing.
Definition Logger.hpp:415

Macro for waiting for all asynchronous loggers to finish processing.

Definition at line 2958 of file log_macros.hpp.

◆ LOGIT_WARN

#define LOGIT_WARN ( ...)
Value:
LOGIT_LOG_AND_RETURN(logit::LogLevel::LOG_LVL_WARN, {}, #__VA_ARGS__, __VA_ARGS__)

Definition at line 862 of file log_macros.hpp.

◆ LOGIT_WARN0

#define LOGIT_WARN0 ( )

◆ LOGIT_WARN0_IF

#define LOGIT_WARN0_IF ( condition)
Value:

Definition at line 1218 of file log_macros.hpp.

◆ LOGIT_WARN0_TO

#define LOGIT_WARN0_TO ( index)

◆ LOGIT_WARN_EVERY_N

#define LOGIT_WARN_EVERY_N ( n,
... )
Value:

Definition at line 1398 of file log_macros.hpp.

◆ LOGIT_WARN_IF

#define LOGIT_WARN_IF ( condition,
... )
Value:

Definition at line 1216 of file log_macros.hpp.

◆ LOGIT_WARN_ONCE

#define LOGIT_WARN_ONCE ( ...)
Value:

Definition at line 1391 of file log_macros.hpp.

◆ LOGIT_WARN_TAG

#define LOGIT_WARN_TAG ( msg,
... )
Value:
#define LOGIT_PRINT_WARN(...)

Definition at line 1414 of file log_macros.hpp.

◆ LOGIT_WARN_THROTTLE

#define LOGIT_WARN_THROTTLE ( p,
... )
Value:

Definition at line 1405 of file log_macros.hpp.

◆ LOGIT_WARN_TO

#define LOGIT_WARN_TO ( index,
... )
Value:
LOGIT_LOG_AND_RETURN_WITH_INDEX(logit::LogLevel::LOG_LVL_WARN, index, {}, #__VA_ARGS__, __VA_ARGS__)

Definition at line 879 of file log_macros.hpp.

◆ LOGIT_WITH_LOG_READER

#define LOGIT_WITH_LOG_READER ( logger_index,
var_name )
Value:
if (auto* var_name = LOGIT_GET_LOG_READER((logger_index)))

Executes a code block when the logger backend supports ILogReader.

Parameters
logger_indexIndex of logger.
var_nameVariable name available inside the block.

Definition at line 2988 of file log_macros.hpp.

◆ LOGIT_WITH_LOG_SUBSCRIBER

#define LOGIT_WITH_LOG_SUBSCRIBER ( logger_index,
var_name )
Value:
if (auto* var_name = LOGIT_GET_LOG_SUBSCRIBER((logger_index)))

Executes a code block when the logger backend supports ILogSubscriber.

Parameters
logger_indexIndex of logger.
var_nameVariable name available inside the block.

Definition at line 3044 of file log_macros.hpp.

◆ LOGIT_WITH_LOGGER_AS

#define LOGIT_WITH_LOGGER_AS ( logger_index,
logger_type,
var_name )
Value:
if (auto* var_name = LOGIT_GET_LOGGER_AS((logger_index), logger_type))

Executes a code block when the logger backend has the requested type.

Parameters
logger_indexIndex of logger.
logger_typeConcrete logger type.
var_nameVariable name available inside the block.

Definition at line 2976 of file log_macros.hpp.

◆ LOGITF_DEBUG

#define LOGITF_DEBUG ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 821 of file log_macros.hpp.

◆ LOGITF_DEBUG_IF

#define LOGITF_DEBUG_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1194 of file log_macros.hpp.

◆ LOGITF_DEBUG_TO

#define LOGITF_DEBUG_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 838 of file log_macros.hpp.

◆ LOGITF_ERROR

#define LOGITF_ERROR ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 927 of file log_macros.hpp.

◆ LOGITF_ERROR_IF

#define LOGITF_ERROR_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1292 of file log_macros.hpp.

◆ LOGITF_ERROR_TO

#define LOGITF_ERROR_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 944 of file log_macros.hpp.

◆ LOGITF_FATAL

#define LOGITF_FATAL ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 980 of file log_macros.hpp.

◆ LOGITF_FATAL_IF

#define LOGITF_FATAL_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1341 of file log_macros.hpp.

◆ LOGITF_FATAL_TO

#define LOGITF_FATAL_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 997 of file log_macros.hpp.

◆ LOGITF_INFO

#define LOGITF_INFO ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 768 of file log_macros.hpp.

◆ LOGITF_INFO_IF

#define LOGITF_INFO_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1145 of file log_macros.hpp.

◆ LOGITF_INFO_TO

#define LOGITF_INFO_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 785 of file log_macros.hpp.

◆ LOGITF_TRACE

#define LOGITF_TRACE ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 715 of file log_macros.hpp.

◆ LOGITF_TRACE_IF

#define LOGITF_TRACE_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1096 of file log_macros.hpp.

◆ LOGITF_TRACE_TO

#define LOGITF_TRACE_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 732 of file log_macros.hpp.

◆ LOGITF_WARN

#define LOGITF_WARN ( fmt_str,
... )
Value:
do { } while (0)

Definition at line 874 of file log_macros.hpp.

◆ LOGITF_WARN_IF

#define LOGITF_WARN_IF ( condition,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 1243 of file log_macros.hpp.

◆ LOGITF_WARN_TO

#define LOGITF_WARN_TO ( index,
fmt_str,
... )
Value:
do { } while (0)

Definition at line 891 of file log_macros.hpp.