()
| 140 | } |
| 141 | |
| 142 | func ExampleLogger_Warn() { |
| 143 | dst := bytes.Buffer{} |
| 144 | log := New(&dst) |
| 145 | |
| 146 | log.Warn(). |
| 147 | Str("foo", "bar"). |
| 148 | Msg("a warning message") |
| 149 | |
| 150 | fmt.Println(decodeIfBinaryToString(dst.Bytes())) |
| 151 | // Output: {"level":"warn","foo":"bar","message":"a warning message"} |
| 152 | } |
| 153 | |
| 154 | func ExampleLogger_Error() { |
| 155 | dst := bytes.Buffer{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…