Skip to content

Commit 2d9b8b7

Browse files
committed
♻️ refactor: update README.md #2
1 parent 99a1e67 commit 2d9b8b7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/slogger/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ func main() {
184184
WithFormatter(slogger.NewTextFormatter(os.Stdout)).
185185
WithOutput(os.Stdout).
186186
WithRotation(slogger.NewRotationOptions().
187-
WithDirectory("logs").
188-
WithMaxBytes(50 * 1024 * 1024).
189-
WithMaxAge(24 * time.Hour).
190-
WithCompress(true))
187+
WithDirectory("logs"). // base directory; created if absent
188+
WithMaxBytes(50 * 1024 * 1024). // rotate at 50 MiB
189+
WithMaxAge(24 * time.Hour). // or after 24 hours, whichever comes first
190+
WithCompress(true)) // zip rotated files
191191

192192
log.Info("application started with rotation enabled")
193193
log.Warn("disk space low", slogger.Int("percent_used", 85))

0 commit comments

Comments
 (0)