NewSampler creates a Core that samples incoming entries, which caps the CPU and I/O load of logging while attempting to preserve a representative subset of your logs. Zap samples by logging the first N entries with a given level and message each tick. If more Entries with the same level and message
(core Core, tick time.Duration, first, thereafter int)
| 193 | // |
| 194 | // Deprecated: use NewSamplerWithOptions. |
| 195 | func NewSampler(core Core, tick time.Duration, first, thereafter int) Core { |
| 196 | return NewSamplerWithOptions(core, tick, first, thereafter) |
| 197 | } |
| 198 | |
| 199 | func (s *sampler) Level() Level { |
| 200 | return LevelOf(s.Core) |