Skip to content

Commit

Permalink
release note about change to log file flushing (#3193)
Browse files Browse the repository at this point in the history
* release note about change to log file flushing

ros2/rcl_logging#95

* mention the volatility of the env var

* Apply suggestions from code review

Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Co-authored-by: Audrow Nash <audrow@openrobotics.org>

* emphasize note about experimental status

also link to issue about logging config file plans

Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Co-authored-by: Audrow Nash <audrow@openrobotics.org>
  • Loading branch information
3 people authored Nov 18, 2022
1 parent f3bb399 commit 2002bbd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source/Releases/Release-Iron-Irwini.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ 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``.
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 (see: https://github.com/ros2/rcl_logging/issues/92), giving you more flexibility in how the logging is done, but that is work that is only planned right now.

Therefore, **this environment variable should be considered experimental and subject to removal without deprecation in the future**, when we add config file support for the ``rcl_logging_spdlog`` logging backend.

See this pull request for more details about the change: https://github.com/ros2/rcl_logging/pull/95

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

Expand Down

0 comments on commit 2002bbd

Please sign in to comment.