Change default log rotation size to 100MB (#19018)

* chg default log rotation size to 100MB to match docs

* rename LogRotateSize -> LogRotateSizeMB

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Doug Lauder
2021-11-23 13:27:26 -05:00
коммит произвёл GitHub
родитель 03f43d7ae5
Коммит fd8fea804b

Просмотреть файл

@@ -15,7 +15,7 @@ import (
)
const (
LogRotateSize = 10000
LogRotateSizeMB = 100
LogCompress = true
LogRotateMaxAge = 0
LogRotateMaxBackups = 0
@@ -211,6 +211,6 @@ func makePlainFormatOptions(enableColor bool) json.RawMessage {
func makeFileOptions(filename string) json.RawMessage {
str := fmt.Sprintf(`{"filename": "%s", "max_size": %d, "max_age": %d, "max_backups": %d, "compress": %t}`,
filename, LogRotateSize, LogRotateMaxAge, LogRotateMaxBackups, LogCompress)
filename, LogRotateSizeMB, LogRotateMaxAge, LogRotateMaxBackups, LogCompress)
return json.RawMessage(str)
}