Text log splitting / rotation in ROS 2
Hi!
This question has seemingly been existing already for years (for ROS1), but I still haven't find any document or examples of how to split or rotate the log files in ROS2 (either from launch file, or directly from ROS2 run command line arguments, or even from code).
This is the only example(Issue 230: https://github.com/ros2/launch/issues...) I found to be related to this topic, but no where is told how to properly set this RotationHandler in launch file (as the launch_counters.py example does not seem to be a proper ROS2 launch file). Attempts to define it in launch file leads either to errors or non-effective results.
This is really an issue for an automated production systems where there is no possibility to be clearing the ROS logs all the time. Even if the ROS_LOG_DIR is set with some specific value, the ~/.ros/log/ directory also fills up with logs, if ROS2 launch is used. Disabling the logging completely is also not a very good idea, as then you can't solve afterwards what went wrong with the production.
Another question: How to define a own specific logging level? Something into between INFO and DEBUG? As otherwise the DEBUG level will output way too much unnecessary rcl system info into the logs.