Skip to content

Hand-code logging.hpp#2870

Merged
clalancette merged 1 commit intorollingfrom
clalancette/hand-code-logging.hpp
Jul 1, 2025
Merged

Hand-code logging.hpp#2870
clalancette merged 1 commit intorollingfrom
clalancette/hand-code-logging.hpp

Conversation

@clalancette
Copy link
Copy Markdown
Contributor

Description

With the similar rewrite coming in rcutils logging macros, this is now required (since the old machinery relied on the removed code in rcutils). Regardless, I think this is more readable and maintainable.

Note that this does not remove the python3-empy dependency, since that is still needed for other things.

Is this user-facing behavior change?

No.

Did you use Generative AI?

No.

Additional Information

Depends on ros2/rcutils#502 , so must be merged at the same time.

With the similar rewrite coming in rcutils logging macros,
this is now required (since the old machinery relied on the
removed code in rcutils).  Regardless, I think this is more
readable and maintainable.

Note that this does *not* remove the python3-empy dependency,
since that is still needed for other things.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
Copy link
Copy Markdown
Contributor Author

(note that the Rpr job here is expected to fail until ros2/rcutils#502 is merged and released)

Copy link
Copy Markdown
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces basic macros like RCLCPP_STATIC_ASSERT_LOGGER and RCLCPP_LOG_TIME_POINT_FUNC to remove redundant implementation, and ensuring that documentation stays clean with copydoc doc string from basic macros to avoid describing the same docstring again and again.

lgtm with green CI.

@clalancette
Copy link
Copy Markdown
Contributor Author

clalancette commented Jun 11, 2025

Pulls: ros2/rcutils#502, #2870
Gist: https://gist.githubusercontent.com/clalancette/b484add6961112574c7cdf4a320ee81f/raw/390bbce57b63eafdd919881fab531023966308b7/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/16204

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ros-discourse
Copy link
Copy Markdown

This pull request has been mentioned on Open Robotics Discourse. There might be relevant details there:

https://discourse.ros.org/t/change-to-the-implementation-of-the-rcutils-log-and-rclcpp-logging-macros/44443/1

@clalancette
Copy link
Copy Markdown
Contributor Author

CI is clean here, and there were no concerns in the discourse thread, so I'm going ahead and merging in this one and ros2/rcutils#502

@clalancette clalancette merged commit 5fd8524 into rolling Jul 1, 2025
2 of 3 checks passed
@clalancette clalancette deleted the clalancette/hand-code-logging.hpp branch July 1, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants