MCPcopy
hub / github.com/tuna/tunasync / withDefaultHandler

Function withDefaultHandler

internal/logger_test.go:19–27  ·  view source on GitHub ↗
(t *testing.T, handler slog.Handler)

Source from the content-addressed store, hash-verified

17}
18
19func withDefaultHandler(t *testing.T, handler slog.Handler) {
20 t.Helper()
21
22 prev := currentHandler()
23 defaultHandler.Store(handler)
24 t.Cleanup(func() {
25 defaultHandler.Store(prev)
26 })
27}
28
29func TestInitLoggerConfiguresHandler(t *testing.T) {
30 prev := currentHandler()

Calls 1

currentHandlerFunction · 0.85

Tested by

no test coverage detected