-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[libbeat] Add flag for rotating log files on startup #11953
Conversation
4534807
to
35bfdc7
Compare
The failing test on Jenkins seems related to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR @faec, I really like your clarifying comments.
I left a couple of minor questions / suggestions
auditbeat/auditbeat.reference.yml
Outdated
@@ -1173,6 +1173,10 @@ logging.files: | |||
# Unix epoch. Defaults to disabled. | |||
#interval: 0 | |||
|
|||
# Rotate existing logs on startup rather than appending to the existing | |||
# file. Defaults to true. | |||
# rotateonopen: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like this setting would be clearer using start
or startup
instead of open
. I don't think it's obvious to the user what open
means here.
I'm OK with using open internally (rotator already uses open
for this concept).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, changed open -> startup everywhere (I'd rather use the same name internally so it's easy to find)
that push was a squashed merge of all the original commits (because some of them were committed without the right email address, so the CLA checker wouldn't let them through)... it looks like the build itself is segfaulting, it may be refusing to rerun on something with no binary changes from previous run? is there a way to try it again? |
I squash all the time and the build kicks again just fine. There might be a problem with this particular test under Windows. Can you check? There's a couple of Windows boxes in {beats}/Vagrantfile.
You comment: jenkins, test this |
I (believe I) fixed the problem with the windows unit test. travis-ci is still failing, but it's been failing on everything for the last couple days (and none of the failures look real); beats-ci is happy now, so this is ready for final review :-) |
* Add the `logging.files.rotateonopen` option (elastic#11537) * Rename rotateonopen -> rotateonstartup * Commenting out part of the rotator test to troubleshoot on Windows * test troubleshooting * updating x-pack/winlogbeat docs * troubleshooting unit test on windows * troubleshooting windows unit tests * Candidate fix for unit test
Adds the
logging.files.rotateonopen
file and correspondingFileConfig.RotateOnOpen
flag, controlling whether existing log files are rotated on startup or appended to.Resolves #11537.