Skip to content

Commit 164ec91

Browse files
authored
Add logr implementation to README and json.RawMessage to Fields() (#337)
1 parent c1533bd commit 164ec91

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ with zerolog library is [CSD](https://github.com/toravir/csd/).
617617

618618
* [grpc-zerolog](https://github.com/cheapRoc/grpc-zerolog): Implementation of `grpclog.LoggerV2` interface using `zerolog`
619619
* [overlog](https://github.com/Trendyol/overlog): Implementation of `Mapped Diagnostic Context` interface using `zerolog`
620+
* [zerologr](https://github.com/hn8/zerologr): Implementation of `logr.LogSink` interface using `zerolog`
620621

621622
## Benchmarks
622623

fields.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package zerolog
22

33
import (
4+
"encoding/json"
45
"net"
56
"sort"
67
"time"
@@ -245,6 +246,8 @@ func appendFields(dst []byte, fields map[string]interface{}) []byte {
245246
dst = enc.AppendIPPrefix(dst, val)
246247
case net.HardwareAddr:
247248
dst = enc.AppendMACAddr(dst, val)
249+
case json.RawMessage:
250+
dst = appendJSON(dst, val)
248251
default:
249252
dst = enc.AppendInterface(dst, val)
250253
}

0 commit comments

Comments
 (0)