rcutils
rcutils copied to clipboard
Adds {severity_with_color} as a log format option.
Description
This change adds a new log formatting token option: {severity_with_color}. When used in the log format string, the severity level will be colorized in the log output, but the rest of the line will not be affected. If RCUTILS_COLORIZED_OUTPUT=1, causing the entire line to be colorized, {severity_with_color} behaves the same as {severity}.
Example usage:
[{severity_with_color}] [{name}]: {message} ({function_name}() at {file_name}:{line_number})
Is this user-facing behavior change?
Yes. It allows users to use {severity_with_color} in their log format.
Did you use Generative AI?
No