-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuring logging directory through environment variables #53
Allow configuring logging directory through environment variables #53
Conversation
But maybe it shouldn't be |
7e50a7a
to
e8cf2b8
Compare
@ros-pull-request-builder retest this please |
oh, build.ros.org doesn't build everything from source. |
Signed-off-by: Christophe Bedard <[email protected]>
e8cf2b8
to
07dfba4
Compare
@jacobperron could you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left a bunch of comment here and there, but this seems to be going in the right direction.
Thanks for working on this @christophebedard !
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
By the way, the PR checker isn't passing. |
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
After addressing comments here, we should also update the logging tutorial: https://index.ros.org/doc/ros2/Tutorials/Logging-and-logger-configuration/. |
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
yeah, it requires ros2/rcpputils#98 |
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
rcl_logging_interface/include/rcl_logging_interface/rcl_logging_interface.h
Outdated
Show resolved
Hide resolved
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
@ros-pull-request-builder retest this please |
Hope you don't mind, here's CI for this PR + ros2/launch#460 with |
Signed-off-by: Christophe Bedard <[email protected]>
like @ivanpauno pointed out previously, the tests aren't passing on Windows because they're using
Note that, in the Logging and logger configuration tutorial, I used forward slashes for Windows, so it wouldn't currently work with option 1: https://index.ros.org/doc/ros2/Tutorials/Logging-and-logger-configuration/#logging-directory-configuration |
Signed-off-by: Christophe Bedard <[email protected]>
I ended up going with option 2 (+ a bit of option 1, as mentioned above) because it's more resilient: c8aae9e I've also made the same modification in ros2/launch#460. Let me know what you think. I've tested on both Ubuntu and Windows. Here's a CI rebuild: |
Signed-off-by: Christophe Bedard <[email protected]>
I missed the MSBuild warning in the first CI run. Should be fixed in 1a4f0e0. Windows rebuild: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right, this is starting to look better. I still found a few more memory leaks to clean up.
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
Signed-off-by: Christophe Bedard <[email protected]>
dd0a976
to
97f6824
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now. Thanks for the iterations.
I'll run CI on it next.
Merging together with ros2/launch#460, thanks @christophebedard for the contribution! |
thank you for the review @ivanpauno et al. 😄 |
I would like to backport this PR to Foxy with ros2/launch#460. However, the rcl_logging_interface was never merged into Foxy. I would need to backport quite a bit to get to this PR. I would first need to backport #41 and then move forward. |
cc @jacobperron |
@jacobperron @ivanpauno |
This allows configuring the logging directory through environment variables using the following logic:
Since this function is meant to be used by all logging implementations, I put it in
rcl_logging_interface
. I also added a test.Closes #50
Requires ros2/rcpputils#98