Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Logrotate] Add log rotate configuration #15116
base: master
Are you sure you want to change the base?
[Logrotate] Add log rotate configuration #15116
Changes from all commits
4d9b427
7f89174
6868b21
1e6c5dc
91179d7
dfd71e6
b30a3fe
7807468
ae7b4c3
544937b
c4c32e2
77e864f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This file was not required previously. Why is this required now. Isn't rsyslog enough?
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.
rsyslog was split into common and per-logfile config.
And the reason why it was done like that, because once config file will be generated, you can use to rotate corresponding log file manually, and not all files together.
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.
What is the purpose of differentiating debug message alone through separate configuration?
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.
We use the debug file separately, so we need to have a separation. By default that file has the same configuration as it had before.
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.
In my opinion we need separate file only if debugs are much more and require special attention. I don't think that's the case in sonic as we have all debug logs as part of syslog itself and I am not sure if debug file is used.
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.
If you don't want to rotate it, you just don't configure it. For the rest of people who want to use debug file and rotate they can configure it in the DB and rotate.
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.
I don't think this log file is used at all on SONiC?
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.
Can you clarify what does this frequency control? The frequency of logrotate itself is being controlled by timer. Why is frequency needed here?
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.
this is weekly, daily, monthly etc. https://linux.die.net/man/8/logrotate#:~:text=Each%20log%20file%20may%20be%20handled%20daily%2C%20weekly%2C%20monthly%2C%20or%20when%20it%20grows%20too%20large.