feat(logging): make log size and log backups configurable (#657)

feat(logging): make log size and backups configurable
This commit is contained in:
ze0s 2023-01-17 21:35:31 +01:00 committed by GitHub
parent 9e0edc577f
commit 0af95e2b44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 2 deletions

View file

@ -59,8 +59,8 @@ func New(cfg *domain.Config) Logger {
l.writers = append(l.writers,
&lumberjack.Logger{
Filename: cfg.LogPath,
MaxSize: 50, // megabytes
MaxBackups: 3,
MaxSize: cfg.LogMaxSize, // megabytes
MaxBackups: cfg.LogMaxBackups,
},
)
}