MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestCronLogAdapter_Error

Function TestCronLogAdapter_Error

deprecated_cronopts/log_test.go:19–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17}
18
19func TestCronLogAdapter_Error(t *testing.T) {
20 var buf bytes.Buffer
21 l := CronLogAdapter{Logging: log.NewLogfmtLogger(&buf)}
22 l.Error(errors.New("err"), "msg", "key", "value")
23 assert.Equal(t, "level=error msg=msg err=err key=value\n", buf.String())
24}

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected