Skip to content

Comments

add functionality to enable color logging for ros2launch messages#945

Open
andreas-loeffler wants to merge 1 commit intoros2:rollingfrom
andreas-loeffler:feature/enable_color_logging
Open

add functionality to enable color logging for ros2launch messages#945
andreas-loeffler wants to merge 1 commit intoros2:rollingfrom
andreas-loeffler:feature/enable_color_logging

Conversation

@andreas-loeffler
Copy link

Description

This PR adds color logging support to the launch system. Currently the logs of individual nodes run from the launch file can be colorized using e.g. emulate_tty, however the messages generated by ros2launch itself (e.g., "process started", "process has died", and log tags [INFO] or [ERROR]) remained unaffected/non-colored.

Corresponding tests to the colorlog functionality have been added too.

(a) ros2 launch using the newly added colorlogging
image

(b) old behavior in which RCUTILS_COLORIZED_OUTPUT or emulaty_tty did not affect the color logging ability of ros2launch messages
image

Fixes #942

Is this user-facing behavior change?

Yes. Users will now see colorized log output for ros2launch events when running in a tty or when RCUTILS_COLORIZED_OUTPUT=1

Did you use Generative AI?

No

Additional Information

Signed-off-by: Andreas Loeffler <73336148+andreas-loeffler@users.noreply.github.com>
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.

Add colorlog support

1 participant