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

Function ExampleLogger_Trace

log_example_test.go:106–115  ·  log_example_test.go::ExampleLogger_Trace
()

Source from the content-addressed store, hash-verified

104}
105
106func ExampleLogger_Trace() {
107 log := zerolog.New(os.Stdout)
108
109 log.Trace().
110 Str("foo", "bar").
111 Int("n", 123).
112 Msg("hello world")
113
114 // Output: {"level":"trace","foo":"bar","n":123,"message":"hello world"}
115}
116
117func ExampleLogger_Debug() {
118 log := zerolog.New(os.Stdout)

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
MsgMethod · 0.80
IntMethod · 0.45
StrMethod · 0.45
TraceMethod · 0.45

Tested by

no test coverage detected