From 9764efa8254a0b93e3c617a598ccc91115f3cfcf Mon Sep 17 00:00:00 2001 From: William Woodall Date: Wed, 16 Nov 2022 21:57:28 -0800 Subject: [PATCH 1/4] release note about change to log file flushing https://github.com/ros2/rcl_logging/pull/95 --- source/Releases/Release-Iron-Irwini.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/Releases/Release-Iron-Irwini.rst b/source/Releases/Release-Iron-Irwini.rst index 39d923cc4d3..d616b318f32 100644 --- a/source/Releases/Release-Iron-Irwini.rst +++ b/source/Releases/Release-Iron-Irwini.rst @@ -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 ------------ From 640b1097c888c67d060be86e105cdab42221fb15 Mon Sep 17 00:00:00 2001 From: William Woodall Date: Wed, 16 Nov 2022 21:58:59 -0800 Subject: [PATCH 2/4] mention the volatility of the env var --- source/Releases/Release-Iron-Irwini.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Releases/Release-Iron-Irwini.rst b/source/Releases/Release-Iron-Irwini.rst index d616b318f32..f834f86d857 100644 --- a/source/Releases/Release-Iron-Irwini.rst +++ b/source/Releases/Release-Iron-Irwini.rst @@ -79,6 +79,7 @@ We tested the change and did not find that the CPU overhead was significant, eve 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. +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 issue for more details: https://github.com/ros2/rcl_logging/pull/95 From c4776884b29edbca9b364797bc539a1328f44140 Mon Sep 17 00:00:00 2001 From: William Woodall Date: Fri, 18 Nov 2022 14:23:27 -0800 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Ivan Santiago Paunovic Co-authored-by: Audrow Nash --- source/Releases/Release-Iron-Irwini.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Releases/Release-Iron-Irwini.rst b/source/Releases/Release-Iron-Irwini.rst index f834f86d857..2038d249052 100644 --- a/source/Releases/Release-Iron-Irwini.rst +++ b/source/Releases/Release-Iron-Irwini.rst @@ -71,12 +71,13 @@ 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. +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. +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. 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. From 328c317cb35a772c7a0fabc5d9e07e07a356a04f Mon Sep 17 00:00:00 2001 From: William Woodall Date: Fri, 18 Nov 2022 14:27:00 -0800 Subject: [PATCH 4/4] emphasize note about experimental status also link to issue about logging config file plans --- source/Releases/Release-Iron-Irwini.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/Releases/Release-Iron-Irwini.rst b/source/Releases/Release-Iron-Irwini.rst index 2038d249052..397a5619c86 100644 --- a/source/Releases/Release-Iron-Irwini.rst +++ b/source/Releases/Release-Iron-Irwini.rst @@ -79,10 +79,11 @@ Previously, ``spdlog`` was used without configuring anything other than creating 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. -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. +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. -See this issue for more details: https://github.com/ros2/rcl_logging/pull/95 + 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 ------------