Add output example for sampled messages
This commit is contained in:
parent
aff9804294
commit
36c85e7f5e
|
@ -131,6 +131,8 @@ log.Logger = log.With().Str("foo", "bar").Logger()
|
||||||
```go
|
```go
|
||||||
sampled := log.Sample(10)
|
sampled := log.Sample(10)
|
||||||
sampled.Info().Msg("will be logged every 10 messages")
|
sampled.Info().Msg("will be logged every 10 messages")
|
||||||
|
|
||||||
|
// Output: {"time":1494567715,"sample":10,"message":"will be logged every 10 messages"}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Global Settings
|
## Global Settings
|
||||||
|
|
Loading…
Reference in New Issue