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

Function ExampleLogger_Print

binary_test.go:83–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81}
82
83func ExampleLogger_Print() {
84 dst := bytes.Buffer{}
85 log := New(&dst)
86
87 log.Print("hello world")
88
89 fmt.Println(decodeIfBinaryToString(dst.Bytes()))
90 // Output: {"level":"debug","message":"hello world"}
91}
92
93func ExampleLogger_Printf() {
94 dst := bytes.Buffer{}

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected