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

Function Fields

options.go:62–66  ·  view source on GitHub ↗

Fields adds fields to the Logger.

(fs ...Field)

Source from the content-addressed store, hash-verified

60
61// Fields adds fields to the Logger.
62func Fields(fs ...Field) Option {
63 return optionFunc(func(log *Logger) {
64 log.core = log.core.With(fs)
65 })
66}
67
68// ErrorOutput sets the destination for errors generated by the Logger. Note
69// that this option only affects internal errors; for sample code that sends

Callers 4

TestLoggerInitialFieldsFunction · 0.85
TestLoggerWithFunction · 0.85
buildOptionsMethod · 0.85

Calls 2

optionFuncFuncType · 0.70
WithMethod · 0.65

Tested by 3

TestLoggerInitialFieldsFunction · 0.68
TestLoggerWithFunction · 0.68