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
()
| 225 | // See [NewDevelopmentEncoderConfig] for information |
| 226 | // on the default encoder configuration. |
| 227 | func 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. |
| 239 | func (cfg Config) Build(opts ...Option) (*Logger, error) { |