[rosout] Proper logrotation for rosout#991
Conversation
|
Summoning @gregwjacobs who is likely to have an opinion on this. It'd be great to have some tests covering this behaviour but otherwise LGTM. |
|
I also thought about writing a test for this functionality but with the current implementation we always need to write at least 100MB to the disk to see that the log rotates once - which I think is too much for a test. I'd therefor expose the max file size parameter as a ros parameter or command line argument and write the test with a reduced file size. |
|
I have cherry-picked your patch to the newly created lunar-devel branch: ce4d726 In that process I have removed the unrelated whitespace change (https://github.com/ros/ros_comm/pull/991/files#diff-c21b75d2d000be7cceac00629a0a9e23R94) as well as readded the output to Thank you! |
|
It would be great if you could create a separate PR for making the limit configurable as well as cover the feature with tests. |
This PR fixes #854 by rotating the log files as usual in Linux to guarantee the ordering of log files (https://en.wikipedia.org/wiki/Log_rotation).
As discussed previously, this PR does not touch the initializers of the class and targets the Luna release.