Various cleanups in the logging code#370
Merged
clalancette merged 12 commits intorollingfrom Aug 10, 2022
Merged
Conversation
This just restricts their scope a bit. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Make it return early when possible to avoid indentation. No functional change. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
In particular, don't set g_rcutils_logging_initialized to true if we failed to initialize the string map. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Make it so that we don't set erroneous return values that we'll never use. Also simplify the code a bit Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Exit early if we get an error with it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This just restricts their visibility a bit. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
_s for the structure, and _t for the typedef. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This can just be inline code. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
We had some of the infrastructure in place to run tests with different RMWs, but we were never using it. Additionally, it doesn't make a huge amount of sense to use different RMWs at the rcutils test layer; it is below the RMW. Just remove the infrastructure. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is just a thin wrapper around ament_add_{gtest,gmock},
so just use that.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
These are only needed in the header files. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
If we make it to the end of the function, it is always a success. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Contributor
Author
Contributor
Author
|
Since this is all green, going ahead and merging. Thanks for the review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR, by itself, just does a bunch of minor cleanup in the logging code. Besides code cleanliness, the main reason to put this in is to facilitate a further optimization in the rcutils logging infrastructure, which I'll open up after this one is in.
The changes in this PR generally revolve around making the code easier to read, removing unnecessary infrastructure, and generally just cleaning things up. For review, it is easiest to review this PR patch-by-patch, as each one does a targeted thing. If necessary, I can open up separate PRs for each one, but that seemed....tedious :).