diff --git a/encoder/text_encoder.go b/encoder/text_encoder.go index 63dc25e..cdc414b 100644 --- a/encoder/text_encoder.go +++ b/encoder/text_encoder.go @@ -222,11 +222,13 @@ func (enc *textEncoder) AddDuration(key string, val time.Duration) { func (enc *textEncoder) AddFloat64(key string, val float64) { enc.addKey(key) enc.appendFloat(val, 64) + enc.buf.AppendByte(']') } func (enc *textEncoder) AddInt64(key string, val int64) { enc.addKey(key) enc.addElementSeparator() enc.buf.AppendInt(val) + enc.buf.AppendByte(']') } func (enc *textEncoder) AddReflected(key string, obj interface{}) error { enc.resetReflectBuf() @@ -268,6 +270,7 @@ func (enc *textEncoder) AddUint64(key string, val uint64) { enc.addKey(key) enc.addElementSeparator() enc.buf.AppendUint(val) + enc.buf.AppendByte(']') } //noinspection GoRedundantConversion diff --git a/log_test.go b/log_test.go index 6ba62cd..648a62e 100644 --- a/log_test.go +++ b/log_test.go @@ -21,7 +21,7 @@ func TestLogWithConfig(t *testing.T) { config.Init() - With("traceid", "21221212122") + With("traceid", float64(21221212122)) Debugf("this is %s message", "debug") config.Init() With(zap.String("traceid", "12123123123")) diff --git a/version b/version index 04eddb2..e1d848b 100644 --- a/version +++ b/version @@ -1 +1 @@ -v0.0.7 \ No newline at end of file +v0.0.8 \ No newline at end of file