Skip to content

Commit

Permalink
release note about change to log file flushing
Browse files Browse the repository at this point in the history
  • Loading branch information
wjwwood authored Nov 17, 2022
1 parent f3bb399 commit 9764efa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions source/Releases/Release-Iron-Irwini.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ Classes that were changed:

The old class names are still there, but will be deprecated.

Change to the default console logging file flushing behavior
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This specifically applies to the default ``spdlog`` based logging backend in ROS 2, implemented in ``rcl_logging_spdlog``, and log file flushing was changed to flush every time an "error" log message is used, e.g. each `RCLCPP_ERROR()` call, and also periodically every five seconds.

Previously, ``spdlog`` was used without configuring anything other than creating the sink for logging to a file.

We tested the change and did not find that the CPU overhead was significant, even on machines with slow disks (e.g. sd cards).
However, if this change is causing you problems you can get the old behavior by setting the ``RCL_LOGGING_SPDLOG_EXPERIMENTAL_OLD_FLUSHING_BEHAVIOR=1`` environment variable.

Later we would like to have support for a full configuration file, giving you more flexibility in how the logging is done, but that is work that is only planned right now.

See this issue for more details: https://github.com/ros2/rcl_logging/pull/95

Known Issues
------------

Expand Down

0 comments on commit 9764efa

Please sign in to comment.