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

Function NewDevelopmentConfig

config.go:227–236  ·  view source on GitHub ↗

NewDevelopmentConfig builds a reasonable default development logging configuration. Logging is enabled at DebugLevel and above, and uses a console encoder. Logs are written to standard error. Stacktraces are included on logs of WarnLevel and above. DPanicLevel logs will panic. See [NewDevelopmentEn

()

Source from the content-addressed store, hash-verified

225// See [NewDevelopmentEncoderConfig] for information
226// on the default encoder configuration.
227func NewDevelopmentConfig() Config {
228 return Config{
229 Level: NewAtomicLevelAt(DebugLevel),
230 Development: true,
231 Encoding: "console",
232 EncoderConfig: NewDevelopmentEncoderConfig(),
233 OutputPaths: []string{"stderr"},
234 ErrorOutputPaths: []string{"stderr"},
235 }
236}
237
238// Build constructs a logger from the Config and Options.
239func (cfg Config) Build(opts ...Option) (*Logger, error) {

Callers 2

TestConfigFunction · 0.85
NewDevelopmentFunction · 0.85

Calls 2

NewAtomicLevelAtFunction · 0.85

Tested by 1

TestConfigFunction · 0.68