MCPcopy Index your code
hub / github.com/php/frankenphp / newTestLogger

Function newTestLogger

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

Source from the content-addressed store, hash-verified

9)
10
11func newTestLogger(t *testing.T) (*slog.Logger, fmt.Stringer) {
12 t.Helper()
13
14 var buf syncBuffer
15
16 return slog.New(slog.NewTextHandler(&buf, &slog.HandlerOptions{Level: slog.LevelDebug})), &buf
17}
18
19// SyncBuffer is a thread-safe buffer for capturing logs in tests.
20type syncBuffer struct {

Callers 3

testLog_error_logFunction · 0.85
testLog_frankenphp_logFunction · 0.85
TestWorkerGetOptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected