MCPcopy
hub / github.com/uber-go/zap / ExampleNewStdLog

Function ExampleNewStdLog

example_test.go:204–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202}
203
204func ExampleNewStdLog() {
205 logger := zap.NewExample()
206 defer logger.Sync()
207
208 std := zap.NewStdLog(logger)
209 std.Print("standard logger wrapper")
210 // Output:
211 // {"level":"info","msg":"standard logger wrapper"}
212}
213
214func ExampleRedirectStdLog() {
215 logger := zap.NewExample()

Callers

nothing calls this directly

Calls 4

NewExampleFunction · 0.92
NewStdLogFunction · 0.92
SyncMethod · 0.65
PrintMethod · 0.45

Tested by

no test coverage detected