-
Notifications
You must be signed in to change notification settings - Fork 101
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
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>
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.
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>
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'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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/log
directory.Connects to ros2/rcl_logging#9
Not yet ready for review, opening for visibility.