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

Function TestSpanLogger

logging/log_test.go:63–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestSpanLogger(t *testing.T) {
64 var mock mockSpan
65 spanLogger{
66 span: &mock,
67 base: log.NewNopLogger(),
68 kvs: []interface{}{"foo", log.Valuer(func() interface{} { return "bar" })},
69 }.Log("baz", "qux")
70
71 assert.Equal(t, []interface{}{"foo", "bar", "baz", "qux"}, mock.received)
72}
73
74type mockValue struct{}
75

Callers

nothing calls this directly

Calls 1

LogMethod · 0.80

Tested by

no test coverage detected