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

Parameter logfile_rotation_max_size does not work as expected #6776

Closed
Lars-Diehl opened this issue Dec 9, 2019 · 2 comments · Fixed by #7133
Closed

Parameter logfile_rotation_max_size does not work as expected #6776

Lars-Diehl opened this issue Dec 9, 2019 · 2 comments · Fixed by #7133
Labels
area/logging bug unexpected problem or unintended behavior
Milestone

Comments

@Lars-Diehl
Copy link

I evaluated log file rotation based on file size (Parameter logfile_rotation_max_size ) with telegraf 1.12.6 under Windows.

After some Research it looks like the current implementration uses the number of bytes written to the log file by the program instead of using the actual file size of the logfile.

So the log file is not switched when a certain file size is reached but when a certain number of bytes have been written to the log after the program has been started.

Either the documentation or the implemtation needs to be changed. I would vote for the latter.

@danielnelson danielnelson added area/logging bug unexpected problem or unintended behavior labels Dec 9, 2019
@danielnelson
Copy link
Contributor

Agreed, this is a bug and the implementation should be fixed.

@HarshitOnGitHub
Copy link
Contributor

Have opened a PR for this: #7133.

@danielnelson danielnelson added this to the 1.14.0 milestone Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants