()
| 101 | } |
| 102 | |
| 103 | func ExampleLogger_Trace() { |
| 104 | dst := bytes.Buffer{} |
| 105 | log := New(&dst) |
| 106 | |
| 107 | log.Trace(). |
| 108 | Str("foo", "bar"). |
| 109 | Int("n", 123). |
| 110 | Msg("hello world") |
| 111 | |
| 112 | fmt.Println(decodeIfBinaryToString(dst.Bytes())) |
| 113 | // Output: {"level":"trace","foo":"bar","n":123,"message":"hello world"} |
| 114 | } |
| 115 | |
| 116 | func ExampleLogger_Debug() { |
| 117 | dst := bytes.Buffer{} |