Function rcl_logging_rosout_output_handler

Function Documentation

void rcl_logging_rosout_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 output handler outputs log messages to rosout topics.

When called with a logger name and log message this function will attempt to find a rosout publisher correlated with the logger name and publish a Log message out via that publisher. If there is no publisher directly correlated with the logger then nothing will be done.

This function is meant to be registered with the logging functions for rcutils, and shouldn’t be used outside of that context. Additionally, arguments like args should be non-null and properly initialized otherwise it is undefined behavior.

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No

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 list of arguments to insert into the formatted log message

  • args[in] argument for the string format