How to limit ros2 log size

asked 2021-10-25 23:03:18 -0600

Hello: I am using ros2 RCLCPP_INFO to record the log, but my process will record a lot of log, so the ROS_LOG_DIR will too big. Does eveeyone know how to limit the single log file size in ros2? or how to delete the file when ros2 keeping the log file?

Thanks

edit retag flag offensive close merge delete

Comments

A very good question, there is no detailed documentation, or I am not able to find it.

tommy_erko gravatar image tommy_erko  ( 2023-01-10 07:02:04 -0600 )edit

Hi! I'm also having trouble with this topic. I work with an automated mobile robot industry, and the problem is, that ROS keeps writing all the time into the same log file, meaning the system will run out of diskspace after a while. So is there any ways to limit the logging by e.g. writing to a new file, and keeping some maximum amount of log files on the disk?

ahopsu gravatar image ahopsu  ( 2023-03-02 16:09:37 -0600 )edit