Skip to content

Add colorlog support #942

@solonovamax

Description

@solonovamax

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:

self.file_formatter = logging.Formatter(
log_format, style=log_style
)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions