Add logr implementation to README and json.RawMessage to Fields() (#337)
This commit is contained in:
parent
c1533bd5f8
commit
164ec91b0c
@ -617,6 +617,7 @@ with zerolog library is [CSD](https://github.com/toravir/csd/).
|
||||
|
||||
* [grpc-zerolog](https://github.com/cheapRoc/grpc-zerolog): Implementation of `grpclog.LoggerV2` interface using `zerolog`
|
||||
* [overlog](https://github.com/Trendyol/overlog): Implementation of `Mapped Diagnostic Context` interface using `zerolog`
|
||||
* [zerologr](https://github.com/hn8/zerologr): Implementation of `logr.LogSink` interface using `zerolog`
|
||||
|
||||
## Benchmarks
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package zerolog
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net"
|
||||
"sort"
|
||||
"time"
|
||||
@ -245,6 +246,8 @@ func appendFields(dst []byte, fields map[string]interface{}) []byte {
|
||||
dst = enc.AppendIPPrefix(dst, val)
|
||||
case net.HardwareAddr:
|
||||
dst = enc.AppendMACAddr(dst, val)
|
||||
case json.RawMessage:
|
||||
dst = appendJSON(dst, val)
|
||||
default:
|
||||
dst = enc.AppendInterface(dst, val)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user