Skip to content

Commit 055a077

Browse files
committed
fix log
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
1 parent a06355b commit 055a077

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/ovsdb/client/client.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@ func init() {
4141
}
4242
namedUUIDCounter = binary.LittleEndian.Uint32(buff)
4343

44-
zc := zap.NewDevelopmentConfig()
44+
zc := zap.NewProductionConfig()
4545
zc.Level = zap.NewAtomicLevelAt(zapcore.Level(-3))
46+
zc.EncoderConfig.EncodeLevel = func(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder) {
47+
if l < zapcore.InfoLevel {
48+
l = zapcore.InfoLevel
49+
}
50+
enc.AppendString(l.String())
51+
}
4652
z, err := zc.Build()
4753
if err != nil {
4854
panic(err)

0 commit comments

Comments
 (0)