add format overriding by environment variables#722
add format overriding by environment variables#722adityapande-1995 merged 3 commits intoros2:rollingfrom
Conversation
Signed-off-by: Marc Bestmann <marc.bestmann@dlr.de>
|
friendly ping @adityapande-1995 @methylDragon @wjwwood |
Signed-off-by: Marc Bestmann <marc.bestmann@dlr.de>
|
Sorry for the long wait. This was fairly low-priority for me and I only now had time to work on it again. |
|
I also added a draft PR for documenting this PR ros2/ros2_documentation#4061 |
|
friendly ping @methylDragon |
|
@SammyRamone thanks for the patience ! The team had a discussion about this, and while we do think there should be a holistic way to configure all of this logging, this is a good feature. I'll run full CI on this. |
|
in case someone else is checking: as of jan 30 2024 this is released into jazzy, is not in humble. great feature, btw @SammyRamone !! would have been just what I was looking for! 👍 (but alas I'm on humble) |
|
Any chance of a https://github.com/Mergifyio backport humble ? |
|
@Mergifyio backport humble |
✅ Backports have been createdDetails
|
* add format overriding by environment variables Signed-off-by: Marc Bestmann <marc.bestmann@dlr.de> * add test for env var based formatting Signed-off-by: Marc Bestmann <marc.bestmann@dlr.de> --------- Signed-off-by: Marc Bestmann <marc.bestmann@dlr.de> (cherry picked from commit 749a6e5)
This is a proposed fix for ros2/launch_ros#368
Originally, I planned on reusing the
RCUTILS_CONSOLE_OUTPUT_FORMATenvironment 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 variablesOVERRIDE_LAUNCH_SCREEN_FORMATandOVERRIDE_LAUNCH_LOG_FORMATsince screen and log formatting is handled differently in the code.I also framed the variables as override similar to #713
Any feedback is welcome.