Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas authored Mar 22, 2023
1 parent 6e534d0 commit ffabf4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ log.Error("Whoops!", "err", "kitchen on fire")
Create sub-loggers with their specific fields.

```go
logger := log.NewWithOptions(os.Stderr, log.Options{
Prefix: "Baking 🍪 "
})
batch2 := logger.With("batch", 2, "chocolateChips", true)
batch2.Debug("Preparing batch 2...")
batch2.Debug("Adding chocolate chips")
Expand Down

0 comments on commit ffabf4a

Please sign in to comment.