zap icon indicating copy to clipboard operation
zap copied to clipboard

Add option to override sink and encoder (#1438)

Open dkropachev opened this issue 1 year ago • 1 comments

Closes https://github.com/uber-go/zap/issues/1438 Makes it possible to override/wrap encoder:

	zap.NewProductionConfig().Build(zap.WrapEncoder(func(encoding string, cfg zapcore.EncoderConfig, encoder zapcore.Encoder) (zapcore.Encoder, error) {
		....
	}))

And sink

	zap.NewProductionConfig().Build(zap.WrapSinker(func(paths []string, sink zapcore.WriteSyncer, errPath []string, errSink zapcore.WriteSyncer) (zapcore.WriteSyncer, zapcore.WriteSyncer, error) {
		...
	}))

dkropachev avatar May 26 '24 04:05 dkropachev

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 26 '24 04:05 CLAassistant