rclcpp logging still uses fprintf all over the place.#439
Conversation
ad9f93b to
6d43a0d
Compare
mikaelarguedas
left a comment
There was a problem hiding this comment.
Thanks @guillaumeautran for the patch.
This looks good to me except some style comments that will make out linter tests fail. You can run the tests of a given package by using ament test --only <PKG_NAME>
| #include "rmw/error_handling.h" | ||
| #include "rmw/rmw.h" | ||
|
|
||
| #include "rcutils/logging_macros.h" |
There was a problem hiding this comment.
Nit: Header included twice?
rclcpp/src/rclcpp/publisher.cpp
Outdated
|
|
||
| #include "rcutils/logging_macros.h" | ||
|
|
||
|
|
rclcpp/src/rclcpp/executor.cpp
Outdated
|
|
||
| #include "rcutils/logging_macros.h" | ||
|
|
||
|
|
There was a problem hiding this comment.
single vertical whitespace
rclcpp/src/rclcpp/utilities.cpp
Outdated
| fprintf(stderr, | ||
| "[rclcpp::error] failed to trigger guard condition: %s\n", rcl_get_error_string_safe()); | ||
| RCUTILS_LOG_ERROR_NAMED( | ||
| "rclcpp", |
There was a problem hiding this comment.
Nit: this should be indented
| #include "rmw/error_handling.h" | ||
| #include "rmw/rmw.h" | ||
|
|
||
| #include "rcutils/logging_macros.h" |
There was a problem hiding this comment.
Nit: we encourage the use of single vertical space
|
@mikaelarguedas I'm having problem running the tests on my system due to some gmock cmake non-sense. Any idea? |
Remove all printf log lines and replace with RCLUTILS_LOG_XXX macros. Issue: ros2#438
6d43a0d to
6ef1494
Compare
|
@guillaumeautran please include more context for that error, ideally all of the build output in a gist.github.com or something. |
|
Ok, I sorted out my issue. Caused by: https://cmake.org/cmake/help/v3.0/policy/CMP0002.html since my cmake version is 3.5.1 |
|
This looks good thanks @guillaumeautran I was going to suggest the use of |
Signed-off-by: cevans87 <c.d.evans87@gmail.com>
Remove all printf log lines and replace with RCLUTILS_LOG_XXX macros.
Issue: #438