Function rcutils_logging_console_output_handler

Function Documentation

void rcutils_logging_console_output_handler(const rcutils_log_location_t *location, int severity, const char *name, rcutils_time_point_value_t timestamp, const char *format, va_list *args)

The default output handler outputs log messages to the standard streams.

The messages with a severity level DEBUG and INFO are written to stdout. The messages with a severity level WARN, ERROR, and FATAL are written to stderr. The console output format of the logged message can be configured through the RCUTILS_CONSOLE_OUTPUT_FORMAT environment variable: see rcutils_logging_initialize_with_allocator() for details. For configuring if using colours or not, RCUTILS_COLORIZED_OUTPUT can be used: see rcutils_logging_initialize_with_allocator() for details.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes, if the underlying *printf functions are

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • location[in] The pointer to the location struct or NULL

  • severity[in] The severity level

  • name[in] The name of the logger, must be null terminated c string

  • timestamp[in] The timestamp for when the log message was made

  • format[in] The format string

  • args[in] The va_list used by the logger