MCPcopy
hub / github.com/op/go-logging / TestLogCallpath

Function TestLogCallpath

log_test.go:71–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestLogCallpath(t *testing.T) {
72 testCallpath(t, "%{callpath} %{message}", "TestLogCallpath.testCallpath.rec...rec.a.b.c")
73 testCallpath(t, "%{callpath:-1} %{message}", "TestLogCallpath.testCallpath.rec...rec.a.b.c")
74 testCallpath(t, "%{callpath:0} %{message}", "TestLogCallpath.testCallpath.rec...rec.a.b.c")
75 testCallpath(t, "%{callpath:1} %{message}", "~.c")
76 testCallpath(t, "%{callpath:2} %{message}", "~.b.c")
77 testCallpath(t, "%{callpath:3} %{message}", "~.a.b.c")
78}
79
80func BenchmarkLogMemoryBackendIgnored(b *testing.B) {
81 backend := SetBackend(NewMemoryBackend(1024))

Callers

nothing calls this directly

Calls 1

testCallpathFunction · 0.85

Tested by

no test coverage detected