rcutils icon indicating copy to clipboard operation
rcutils copied to clipboard

Adds {severity_with_color} as a log format option.

Open alexmaclean6 opened this issue 2 months ago • 12 comments

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

Additional Information

alexmaclean6 avatar Nov 12 '25 19:11 alexmaclean6