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

Function ExampleNew

log_example_test.go:16–21  ·  log_example_test.go::ExampleNew
()

Source from the content-addressed store, hash-verified

14)
15
16func ExampleNew() {
17 log := zerolog.New(os.Stdout)
18
19 log.Info().Msg("hello world")
20 // Output: {"level":"info","message":"hello world"}
21}
22
23func ExampleLogger_With() {
24 log := zerolog.New(os.Stdout).

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
MsgMethod · 0.80
InfoMethod · 0.65

Tested by

no test coverage detected