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

Function WithCaller

exp/zapslog/options.go:48–52  ·  view source on GitHub ↗

WithCaller configures the Logger to include the filename and line number of the caller in log messages--if available.

(enabled bool)

Source from the content-addressed store, hash-verified

46// WithCaller configures the Logger to include the filename and line number
47// of the caller in log messages--if available.
48func WithCaller(enabled bool) HandlerOption {
49 return handlerOptionFunc(func(handler *Handler) {
50 handler.addCaller = enabled
51 })
52}
53
54// WithCallerSkip increases the number of callers skipped by caller annotation
55// (as enabled by the [WithCaller] option).

Callers 1

TestAddCallerFunction · 0.70

Calls 1

handlerOptionFuncFuncType · 0.85

Tested by 1

TestAddCallerFunction · 0.56