Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to rotate windows logs #621

Merged
merged 5 commits into from
Apr 3, 2017
Merged

Add support to rotate windows logs #621

merged 5 commits into from
Apr 3, 2017

Conversation

dzeleski
Copy link
Contributor

The windows agent was not rotating logs correctly. I added support for that here, some changes to how logging is done was altered to add this support. Im open to discussion if we think we need to adjust it briefly but there are now separate log files for each type of output.

#618

sensu/sensu#1617

@cdenneen
Copy link
Contributor

@dzeleski sent you PR

@dzeleski
Copy link
Contributor Author

@cdenneen Cool, ty. Were you able to test those changes out? I wont be able to get to testing it until Monday.

Added parameters to the log rotation
@cdenneen
Copy link
Contributor

@dzeleski I didn't write specific tests but it's passing travis tests that are there.

@dzeleski
Copy link
Contributor Author

@cdenneen sorry I mean did you run the code in puppet on some nodes? I assume it works based on looking at it. Ill be able to pull the code down Monday and test in my lab regardless.

@cwjohnston
Copy link
Contributor

I think this looks good.

For posterity I'll point out that this log rotation implementation relies on the behavior of the winsw service wrapper. Instead of specifying --log FILE as a flag for the Sensu daemon, the rendered XML will start the service daemon with stdout and stderr logging captured by winsw instead of being written directly by the daemon as is done on Linux platforms.

@cwjohnston cwjohnston merged commit f1ed6ea into sensu:master Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants