15 #ifndef RCUTILS__LOGGING_H_ 16 #define RCUTILS__LOGGING_H_ 180 rcutils_log_location_t * location,
211 rcutils_log_location_t * location,
212 int severity,
const char * name,
const char * format,
va_list * args);
220 # define RCUTILS_LIKELY(x) __builtin_expect((x), 1) 225 # define RCUTILS_UNLIKELY(x) __builtin_expect((x), 0) 231 # define RCUTILS_LIKELY(x) (x) 236 # define RCUTILS_UNLIKELY(x) (x) 245 #define RCUTILS_LOGGING_AUTOINIT \ 246 if (RCUTILS_UNLIKELY(!g_rcutils_logging_initialized)) { \ 247 rcutils_logging_initialize(); \ 254 #endif // RCUTILS__LOGGING_H_ The info log level.
Definition: logging.h:63
The warn log level.
Definition: logging.h:64
void rcutils_logging_console_output_handler(rcutils_log_location_t *location, int severity, const char *name, const char *format, va_list *args)
The default output handler outputs log messages to the standard streams.
int g_rcutils_logging_severity_threshold
The global severity threshold before calling the output handler.
bool g_rcutils_logging_initialized
The flag if the logging system has been initialized.
void rcutils_log(rcutils_log_location_t *location, int severity, const char *name, const char *format,...)
Log a message.
void rcutils_logging_set_output_handler(rcutils_logging_output_handler_t function)
Set the current output handler.
size_t line_number
The line number containing the log call.
Definition: logging.h:56
void rcutils_logging_set_severity_threshold(int severity)
Set the global severity threshold.
void rcutils_logging_initialize()
Initialize the logging system.
void(* rcutils_logging_output_handler_t)(rcutils_log_location_t *, int, const char *, const char *, va_list *)
The function signature to log messages.
Definition: logging.h:77
rcutils_logging_output_handler_t rcutils_logging_get_output_handler()
Get the current output handler.
RCUTILS_LOG_SEVERITY
The severity levels of log message.
Definition: logging.h:60
const char * file_name
The name of the source file containing the log call.
Definition: logging.h:54
The structure identifying the caller location in the source code.
Definition: logging.h:49
#define RCUTILS_PUBLIC
Definition: visibility_control.h:48
The fatal log level.
Definition: logging.h:66
struct rcutils_log_location_t rcutils_log_location_t
The structure identifying the caller location in the source code.
rcutils_logging_output_handler_t g_rcutils_logging_output_handler
The function pointer of the current output handler.
int rcutils_logging_get_severity_threshold()
Get the global severity threshold.
The debug log level.
Definition: logging.h:62
const char * function_name
The name of the function containing the log call.
Definition: logging.h:52
The error log level.
Definition: logging.h:65