Add output example for sampled messages

This commit is contained in:
Olivier Poitrey 2017-05-16 22:42:57 -07:00
parent aff9804294
commit 36c85e7f5e

View File

@ -131,6 +131,8 @@ log.Logger = log.With().Str("foo", "bar").Logger()
```go
sampled := log.Sample(10)
sampled.Info().Msg("will be logged every 10 messages")
// Output: {"time":1494567715,"sample":10,"message":"will be logged every 10 messages"}
```
## Global Settings