-
Notifications
You must be signed in to change notification settings - Fork 218
Add logging max size and count for rotation #2229
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
Conversation
@@ -53,6 +53,10 @@ spec: | |||
value: "false" | |||
- name: "JAVA_LOGGING_LEVEL" | |||
value: {{ .javaLoggingLevel | quote }} | |||
- name: "JAVA_LOGGING_MAXSIZE" | |||
value: {{ .javaLoggingFileSizeLimit | default 1000000 | quote }} |
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.
Should we make the default 10MB to match with Kubernetes default (based on this - https://kubernetes.io/docs/concepts/cluster-administration/logging/#logging-at-the-node-level)?
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.
For Kubernetes, you get by default the last 10 MB of the pod output. Here, we have seven files each of 1 MB. I could match the Kubernetes behavior by changing the number of files from 7 to 10.
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 really feel strongly about these defaults, so I'm happy to adjust to the group consensus.
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.
Ok, I feel going from no max size to 1MB might be a big change for customers. I vote for 10MB as that might cover the majority of use-cases without a need for log rotation.
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.
Assuming we need 10,000 domains at 50K each at the default INFO level (since a simple relatively inactive domain yields a "few k" of log data at the INFO level), gives us 500 MB. So 10MB X 7 'feels' a little too small too me.
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.
Unless 1,000 domains is the target? In which case 10MB X 7 looks about right to me...
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.
How about 20MB x 10?
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.
Close enough for me.
This comment has been minimized.
This comment has been minimized.
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.
Approving. I'm assuming 'logstash' is going to be understanding about this change.
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.
LGTM
Resolves issue #2220.
I took a hand wave at the appropriate defaults and selected max file size of 1 MB and 7 total files in the rotation.