mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
e72ed593be
Signed-off-by: Rakshith R <rar@redhat.com>
12 lines
280 B
Go
12 lines
280 B
Go
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))
|
|
}
|