Skip to content

Commit

Permalink
Increase log rollover limit and max backups, enable trailing zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Jun 1, 2023
1 parent 5a537e9 commit 592b61e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ func ConfigureLogger(ctx *cli.Context) {
ForceColors: ctx.GlobalBool("showcolors"),
PadLevelText: true,
FullTimestamp: true,
TimestampFormat: "01-02|15:04:05.999",
TimestampFormat: "01-02|15:04:05.000",
CallerPrettyfier: callerPrettyfier,
}

Log.SetOutput(&lumberjack.Logger{
Filename: log_filename,
MaxSize: 5, // megabytes
MaxBackups: 3,
MaxSize: 500, // megabytes
MaxBackups: 5,
MaxAge: 28, //days
})
}
Expand Down

0 comments on commit 592b61e

Please sign in to comment.