mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
allow nil metric
This commit is contained in:
parent
183edb517c
commit
1e53e7f33b
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,9 @@ func Size(size int) zap.Field {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *metric) RequestLog(ctx context.Context, rpc string, fields ...zap.Field) {
|
func (m *metric) RequestLog(ctx context.Context, rpc string, fields ...zap.Field) {
|
||||||
|
if m == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
peerId, _ := peer.CtxPeerId(ctx)
|
peerId, _ := peer.CtxPeerId(ctx)
|
||||||
ak, _ := peer.CtxPubKey(ctx)
|
ak, _ := peer.CtxPubKey(ctx)
|
||||||
var acc string
|
var acc string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue