-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Logging - set default value for quarkus.log.file.rotation.max-file-size #25072
Conversation
CC @dmlloyd |
This comment has been minimized.
This comment has been minimized.
The test failures are related to the change |
339ced5
to
f462ff0
Compare
The test is fixed. |
I wonder if we should consider this a breaking change in the sense that we drop the support of |
This comment has been minimized.
This comment has been minimized.
@michalszynkiewicz is it (#25072 (comment)) a known flaky test? |
Please let me think a bit about it before merging. I’ll have a look on Monday. |
Not known to me |
So my main problem with this is:
My guess is that with this patch, it won't work anymore and things will get broken (and you can't even fix it given the value for the file size is not optional anymore). |
In theory, you can set the However, this would not work even now - see my comment: if you set In any case, I think that the current behavior is wrong and the unlimited file handler is not a reasonable default. CC @gsmet |
- also change the default value for quarkus.log.file.rotation.max-backup-index
f462ff0
to
4bd700a
Compare
I think I have a config type somewhere which is a type-or-enum which would allow a size to be specified or a keyword like "unlimited". I would personally prefer this over special values. |
quarkus.log.file.rotation.max-backup-index
The current behavior is a bit misleading. The docs say that
quarkus.log.file.rotation.max-file-size
has the default value10
which is not correct, because no default value is set and so no rotation happens (and the log file is growing and growing..) unless you set thequarkus.log.file.rotation.file-suffix
, but then the default value from theorg.jboss.logmanager.handlers.PeriodicSizeRotatingFileHandler
is taken which is0xa0000
, i.e. approx. 650KB (it's actually a bug, because the comment is clear that it should be0xa00000
). Therefore, we set the defaultmax-file-size
to10M
, so the file size is always limited.We also change the default value for
max-backup-index
from1
to5
which is IMO a more reasonable default.