We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99a1e67 commit 2d9b8b7Copy full SHA for 2d9b8b7
1 file changed
pkg/slogger/README.md
@@ -184,10 +184,10 @@ func main() {
184
WithFormatter(slogger.NewTextFormatter(os.Stdout)).
185
WithOutput(os.Stdout).
186
WithRotation(slogger.NewRotationOptions().
187
- WithDirectory("logs").
188
- WithMaxBytes(50 * 1024 * 1024).
189
- WithMaxAge(24 * time.Hour).
190
- WithCompress(true))
+ WithDirectory("logs"). // base directory; created if absent
+ WithMaxBytes(50 * 1024 * 1024). // rotate at 50 MiB
+ WithMaxAge(24 * time.Hour). // or after 24 hours, whichever comes first
+ WithCompress(true)) // zip rotated files
191
192
log.Info("application started with rotation enabled")
193
log.Warn("disk space low", slogger.Int("percent_used", 85))
0 commit comments