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

Function NewTestingLogger

pkg/util/test/logger.go:20–27  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

18}
19
20func NewTestingLogger(t testing.TB) *TestingLogger {
21 logger := &TestingLogger{
22 t: t,
23 mtx: &sync.Mutex{},
24 }
25 registerCleanup(t, logger)
26 return logger
27}
28
29// WithT returns a new logger that logs to t. Writes between the new logger and the original logger are synchronized.
30func (l *TestingLogger) WithT(t testing.TB) log.Logger {

Calls 1

registerCleanupFunction · 0.85