Skip to content

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 7, 2025

This is a proposed fix for ros2/launch_ros#368
Originally, I planned on reusing the RCUTILS_CONSOLE_OUTPUT_FORMAT environment variable for this. Hoewever, this is not possible since launch and rcutils rely on two different logging implementations which have different names for the same things. For example one supports {line_number} and the other {lineno}. Instead I added two environment variables OVERRIDE_LAUNCH_SCREEN_FORMAT and OVERRIDE_LAUNCH_LOG_FORMAT since screen and log formatting is handled differently in the code.
I also framed the variables as override similar to #713

Any feedback is welcome.


This is an automatic backport of pull request #722 done by Mergify.

* add format overriding by environment variables

Signed-off-by: Marc Bestmann <[email protected]>

* add test for env var based formatting

Signed-off-by: Marc Bestmann <[email protected]>

---------

Signed-off-by: Marc Bestmann <[email protected]>
(cherry picked from commit 749a6e5)
Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

this change does not break any userspace, and can be useful for launch log format and stype to override via environmental variables.

i will start the CI, but i would like to have another approval from maintainers.

@fujitatomoya
Copy link
Contributor

fujitatomoya commented Feb 7, 2025

Pulls: #827
Gist: https://gist.githubusercontent.com/fujitatomoya/888efa6fa066afcfe2125fb80df6160b/raw/6e7731e24d3b58d95e26a484450d1f98040492c6/ros2.repos
BUILD args: --packages-above-and-dependencies launch
TEST args: --packages-above launch
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15140

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

@gordon-n-stevenson
Copy link

@fujitatomoya awesome, thanks!

@ahcorde
Copy link
Contributor

ahcorde commented Oct 2, 2025

Pulls: #827
Gist: https://gist.githubusercontent.com/ahcorde/8abb274a4434b54e4984720d253be773/raw/a38330be7ab12853d38ff15c06aa534c6db318c5/ros2.repos
BUILD args: --packages-above-and-dependencies launch
TEST args: --packages-above launch
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17158

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

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.

tests are failing

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.

4 participants