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

Function ExampleLogger_Debug

log_example_test.go:117–126  ·  log_example_test.go::ExampleLogger_Debug
()

Source from the content-addressed store, hash-verified

115}
116
117func ExampleLogger_Debug() {
118 log := zerolog.New(os.Stdout)
119
120 log.Debug().
121 Str("foo", "bar").
122 Int("n", 123).
123 Msg("hello world")
124
125 // Output: {"level":"debug","foo":"bar","n":123,"message":"hello world"}
126}
127
128func ExampleLogger_Info() {
129 log := zerolog.New(os.Stdout)

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
MsgMethod · 0.80
DebugMethod · 0.65
IntMethod · 0.45
StrMethod · 0.45

Tested by

no test coverage detected