add format overriding by environment variables (backport #722)#827
add format overriding by environment variables (backport #722)#827mergify[bot] wants to merge 1 commit intohumblefrom
Conversation
* 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)
fujitatomoya
left a comment
There was a problem hiding this comment.
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.
|
Pulls: #827 |
|
@fujitatomoya awesome, thanks! |
|
Pulls: #827 |
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.
This is an automatic backport of pull request #722 done by Mergify.