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

Function ExampleLogger_Printf

binary_test.go:93–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91}
92
93func ExampleLogger_Printf() {
94 dst := bytes.Buffer{}
95 log := New(&dst)
96
97 log.Printf("hello %s", "world")
98
99 fmt.Println(decodeIfBinaryToString(dst.Bytes()))
100 // Output: {"level":"debug","message":"hello world"}
101}
102
103func ExampleLogger_Trace() {
104 dst := bytes.Buffer{}

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
PrintfMethod · 0.80
PrintlnMethod · 0.80
decodeIfBinaryToStringFunction · 0.70
BytesMethod · 0.45

Tested by

no test coverage detected