Skip to content

Conversation

@alexmaclean6
Copy link

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

Signed-off-by: Alex MacLean <macleale@amazon.com>
Signed-off-by: Alex MacLean <macleale@amazon.com>
alexmaclean6 and others added 2 commits November 13, 2025 08:03
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Alex MacLean <alex@macleanfam.org>
Signed-off-by: Alex MacLean <macleale@amazon.com>
@kscottz
Copy link

kscottz commented Nov 20, 2025

@ahcorde waffle team is assigning this to you. Commenting so I see when it gets merged so I can share it with the community.

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind to add some documentation on ros2_documentation about how to use this new feature ?

@ahcorde
Copy link
Contributor

ahcorde commented Nov 21, 2025

Pulls: #526
Gist: https://gist.githubusercontent.com/ahcorde/c591acc503548d238ce882328cfc0ff0/raw/6ebf6b072064c5bce038503c864fae1a263e4f3c/ros2.repos
BUILD args: --packages-above-and-dependencies rcutils
TEST args: --packages-above rcutils
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17570

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@alexmaclean6
Copy link
Author

Do you mind to add some documentation on ros2_documentation about how to use this new feature ?

Happy to. I'll update the documentation on Monday, and create a pull request to ros2_documentation.

@alexmaclean6
Copy link
Author

Added documentation: ros2/ros2_documentation#6045

@alexmaclean6
Copy link
Author

@ahcorde - I'm trying to decipher the build failures that you listed. Are those build infrastructure errors? I don't see compile or test failures in the console output. I only see IO Exceptions for Jenkins and Hudson.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants