Increases log rotation file size minimum limit (#53169) (#53248)

* fix(NA): increase log rotation minimum log filesize to rotate limit

* chore(NA): correct interval

* docs(NA): add comments to explain everyBytes limits
This commit is contained in:
Tiago Costa 2019-12-17 12:49:05 +00:00 committed by GitHub
parent 63c024493f
commit 98adaee778
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -171,7 +171,7 @@ that feature would not take any effect.
`logging.rotate.everyBytes:`:: [experimental] *Default: 10485760* The maximum size of a log file (that is `not an exact` limit). After the
limit is reached, a new log file is generated. The default size limit is 10485760 (10 MB) and
this option should be at least greater than 1024.
this option should be in the range of 102400 (100KB) to 1073741824 (1GB).
`logging.rotate.keepFiles:`:: [experimental] *Default: 7* The number of most recent rotated log files to keep
on disk. Older files are deleted during log rotation. The default value is 7. The `logging.rotate.keepFiles`

View file

@ -144,7 +144,11 @@ export default () =>
.keys({
enabled: Joi.boolean().default(false),
everyBytes: Joi.number()
.greater(1024)
// > 100KB
.greater(102399)
// < 1GB
.less(1073741825)
// 10MB
.default(10485760),
keepFiles: Joi.number()
.greater(2)