Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to override sink and encoder (#1438) #1439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkropachev
Copy link

@dkropachev dkropachev commented May 26, 2024

Closes #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) {
		...
	}))

@CLAassistant
Copy link

CLAassistant commented May 26, 2024

CLA assistant check
All committers have signed the CLA.

Makes it possible to override/wrap encoder/sink
@dkropachev dkropachev force-pushed the add-wrap-encoder-and-sink-feature branch from 3c04ee1 to 9591248 Compare May 26, 2024 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add option to wrap/override sink and encoder
2 participants