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

Function ExampleLogger_Log

log_example_test.go:181–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179}
180
181func ExampleLogger_Log() {
182 log := zerolog.New(os.Stdout)
183
184 log.Log().
185 Str("foo", "bar").
186 Str("bar", "baz").
187 Msg("")
188
189 // Output: {"foo":"bar","bar":"baz"}
190}
191
192func ExampleEvent_Dict() {
193 log := zerolog.New(os.Stdout)

Callers

nothing calls this directly

Calls 4

NewFunction · 0.92
MsgMethod · 0.80
LogMethod · 0.65
StrMethod · 0.45

Tested by

no test coverage detected