ros2 / ros2/launch

Add colorlog support

Open
#942 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
155
Forks
182
Avg merge
2d 14h
Merged PRs (30d)
6

Description

Description

It would be very nice if support for colorlog could be added, for colorizing log outputs for launch files.

Motivation

Makes logs look nicer & easier to skim over

Design / Implementation Considerations

Should be relatively easy to implement, just check if RCUTILS_COLORIZED_OUTPUT is set to 1 (maybe add another variable?) or the process is detected to be running in a tty, and then replace the Formatter with a ColoredFormatter:

https://github.com/ros2/launch/blob/57c1aeec7b18be4e0e93c91a4b069d4437f5b839/launch/launch/logging/__init__.py#L320-L322

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with launch/launch/logging/init.py around the Formatter setup at lines 320-322, then inspect the repository's logging tests and dependency conventions. Done means launch-file logs use colorlog when the agreed environment or TTY condition applies, while retaining normal formatting otherwise.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.