MCPcopy Index your code
hub / github.com/coder/coder / Logger

Function Logger

testutil/logger.go:19–23  ·  view source on GitHub ↗

Logger returns a "standard" testing logger, with debug level and common flaky errors ignored.

(t testing.TB)

Source from the content-addressed store, hash-verified

17// Logger returns a "standard" testing logger, with debug level and common flaky
18// errors ignored.
19func Logger(t testing.TB) slog.Logger {
20 return slogtest.Make(
21 t, &slogtest.Options{IgnoreErrorFn: IgnoreLoggedError},
22 ).Leveled(slog.LevelDebug)
23}
24
25func IgnoreLoggedError(entry slog.SinkEntry) bool {
26 err, ok := slogtest.FindFirstError(entry)

Calls

no outgoing calls