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

Function AddCaller

options.go:91–93  ·  view source on GitHub ↗

AddCaller configures the Logger to annotate each message with the filename, line number, and function name of zap's caller. See also WithCaller.

()

Source from the content-addressed store, hash-verified

89// AddCaller configures the Logger to annotate each message with the filename,
90// line number, and function name of zap's caller. See also WithCaller.
91func AddCaller() Option {
92 return WithCaller(true)
93}
94
95// WithCaller configures the Logger to annotate each message with the filename,
96// line number, and function name of zap's caller, or not, depending on the

Callers 15

TestNewStdLogFunction · 0.85
TestNewStdLogAtFunction · 0.85
TestNewStdLogAtPanicsFunction · 0.85
TestNewStdLogAtFatalFunction · 0.85
TestRedirectStdLogCallerFunction · 0.85
BenchmarkAddCallerHookFunction · 0.85
TestSugarAddCallerFunction · 0.85

Calls 1

WithCallerFunction · 0.70

Tested by 15

TestNewStdLogFunction · 0.68
TestNewStdLogAtFunction · 0.68
TestNewStdLogAtPanicsFunction · 0.68
TestNewStdLogAtFatalFunction · 0.68
TestRedirectStdLogCallerFunction · 0.68
BenchmarkAddCallerHookFunction · 0.68
TestSugarAddCallerFunction · 0.68