MCPcopy
hub / github.com/rs/zerolog / Sample

Function Sample

log/log.go:32–34  ·  view source on GitHub ↗

Sample returns a logger with the s sampler.

(s zerolog.Sampler)

Source from the content-addressed store, hash-verified

30
31// Sample returns a logger with the s sampler.
32func Sample(s zerolog.Sampler) zerolog.Logger {
33 return Logger.Sample(s)
34}
35
36// Hook returns a logger with the h Hook.
37func Hook(h zerolog.Hook) zerolog.Logger {

Callers 1

ExampleSampleFunction · 0.92

Calls 1

SampleMethod · 0.65

Tested by 1

ExampleSampleFunction · 0.74