MCPcopy
hub / github.com/grafana/tempo / Log

Method Log

pkg/util/test/logger.go:39–57  ·  view source on GitHub ↗
(keyvals ...interface{})

Source from the content-addressed store, hash-verified

37}
38
39func (l *TestingLogger) Log(keyvals ...interface{}) error {
40 if l.done.Load() {
41 return nil
42 }
43
44 // Prepend log with timestamp.
45 keyvals = append([]interface{}{time.Now().String()}, keyvals...)
46
47 l.mtx.Lock()
48 defer l.mtx.Unlock()
49
50 if l.done.Load() {
51 return nil
52 }
53
54 l.t.Log(keyvals...)
55
56 return nil
57}
58
59func registerCleanup(t testing.TB, l *TestingLogger) {
60 t.Cleanup(func() {

Callers

nothing calls this directly

Calls 3

NowMethod · 0.65
LogMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected