ceph-csi/vendor/github.com/gemalto/flume/json_encoder.go

12 lines
280 B
Go
Raw Normal View History

package flume
import "go.uber.org/zap/zapcore"
// NewJSONEncoder just hides the zap json encoder, to avoid exporting zap
func NewJSONEncoder(cfg *EncoderConfig) Encoder {
if cfg == nil {
cfg = &EncoderConfig{}
}
return zapcore.NewJSONEncoder(zapcore.EncoderConfig(*cfg))
}