Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

[rosout] Proper logrotation for rosout - #991

Closed
mgrrx wants to merge 1 commit into
ros:kinetic-develfrom
mgrrx:fix/854
Closed

mgrrx wants to merge 1 commit into
ros:kinetic-develfrom
mgrrx:fix/854

Conversation

@mgrrx

@mgrrx mgrrx commented Feb 16, 2017

Copy link
Copy Markdown
Contributor

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.

@mikepurvis

Copy link
Copy Markdown
Member

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.

@mgrrx

mgrrx commented Feb 17, 2017

Copy link
Copy Markdown
Contributor Author

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.
Do you prefer to have the test together with this PR or should I create a new ticket and PR the test?

@dirk-thomas

Copy link
Copy Markdown
Member

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 cout informing the user that the log is being rotated (ce4d726#diff-c21b75d2d000be7cceac00629a0a9e23R181).

Thank you!

@dirk-thomas

Copy link
Copy Markdown
Member

It would be great if you could create a separate PR for making the limit configurable as well as cover the feature with tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants