Add in utilities needed for log location#155
Conversation
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
That way it is easier to use from the outside. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
f2e92de to
e9a4167
Compare
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
wjwwood
left a comment
There was a problem hiding this comment.
lgtm, other than the nitpick about the doc comment, but that could be fixed after green CI or after merge.
We need this to get basename on macOS. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
nuclearsandwich
left a comment
There was a problem hiding this comment.
I've reviewed and the logic grabbing the process basename (which is the bulk of the new code) looks sound.
I did not assess whether the preprocessor conditionals for cross-platform handling are consistent with the rest of rcutils. I believe @clalancette mentioned that he used get_env.c as a template and this is consistent with that, although it is also more involved.
| return NULL; | ||
| } | ||
| #else | ||
| #error "Unsupported OS" |
There was a problem hiding this comment.
I haven't found examples of other cross-platform code where we explicitly error in fall-through cases. I don't know if that's because other code is structured to assume Linux/Unix in the fall-through case or if runtime errors are being used instead.
There was a problem hiding this comment.
I had more to say about this, but GitHub deleted my review... I'm fine with it as-is.
There was a problem hiding this comment.
I had more to say about this, but GitHub deleted my review...
![]()
This PR provides a few new utilities that are needed to put logging in the users
~/.ros/logdirectory.Connects to ros2/rcl_logging#9
Not yet ready for review, opening for visibility.