(t *testing.T)
| 215 | } |
| 216 | |
| 217 | func TestFormatter(t *testing.T) { |
| 218 | var buf bytes.Buffer |
| 219 | SetOutput(colorprofile.NewWriter(&buf, os.Environ())) |
| 220 | SetLevel(InfoLevel) |
| 221 | SetReportCaller(false) |
| 222 | SetReportTimestamp(false) |
| 223 | SetFormatter(JSONFormatter) |
| 224 | Info("info") |
| 225 | assert.Equal(t, "{\"level\":\"info\",\"msg\":\"info\"}\n", buf.String()) |
| 226 | } |
| 227 | |
| 228 | func TestWithPrefix(t *testing.T) { |
| 229 | l := WithPrefix("test") |
nothing calls this directly
no test coverage detected
searching dependent graphs…