MCPcopy
hub / github.com/rs/zerolog / ConsoleTestWriter

Function ConsoleTestWriter

writer.go:184–188  ·  view source on GitHub ↗

ConsoleTestWriter creates an option that correctly sets the file frame depth for testing.TB log.

(t TestingLog)

Source from the content-addressed store, hash-verified

182
183// ConsoleTestWriter creates an option that correctly sets the file frame depth for testing.TB log.
184func ConsoleTestWriter(t TestingLog) func(w *ConsoleWriter) {
185 return func(w *ConsoleWriter) {
186 w.Out = TestWriter{T: t, Frame: 6}
187 }
188}
189
190// FilteredLevelWriter writes only logs at Level or above to Writer.
191//

Callers 1

TestTestWriterFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestTestWriterFunction · 0.68