Skip to content

Commit 44626be

Browse files
Logging: Add missing variadic operator for fields (#629)
1 parent e94ee56 commit 44626be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interceptors/logging/interceptors.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (c *reporter) PostMsgSend(payload any, err error, duration time.Duration) {
6565
c.ctx,
6666
LevelError,
6767
"payload is not a google.golang.org/protobuf/proto.Message; programmatic error?",
68-
fields.AppendUnique(Fields{"grpc.request.type", fmt.Sprintf("%T", payload)}),
68+
fields.AppendUnique(Fields{"grpc.request.type", fmt.Sprintf("%T", payload)})...,
6969
)
7070
return
7171
}
@@ -79,7 +79,7 @@ func (c *reporter) PostMsgSend(payload any, err error, duration time.Duration) {
7979
c.ctx,
8080
LevelError,
8181
"payload is not a google.golang.org/protobuf/proto.Message; programmatic error?",
82-
fields.AppendUnique(Fields{"grpc.response.type", fmt.Sprintf("%T", payload)}),
82+
fields.AppendUnique(Fields{"grpc.response.type", fmt.Sprintf("%T", payload)})...,
8383
)
8484
return
8585
}
@@ -110,7 +110,7 @@ func (c *reporter) PostMsgReceive(payload any, err error, duration time.Duration
110110
c.ctx,
111111
LevelError,
112112
"payload is not a google.golang.org/protobuf/proto.Message; programmatic error?",
113-
fields.AppendUnique(Fields{"grpc.request.type", fmt.Sprintf("%T", payload)}),
113+
fields.AppendUnique(Fields{"grpc.request.type", fmt.Sprintf("%T", payload)})...,
114114
)
115115
return
116116
}
@@ -124,7 +124,7 @@ func (c *reporter) PostMsgReceive(payload any, err error, duration time.Duration
124124
c.ctx,
125125
LevelError,
126126
"payload is not a google.golang.org/protobuf/proto.Message; programmatic error?",
127-
fields.AppendUnique(Fields{"grpc.response.type", fmt.Sprintf("%T", payload)}),
127+
fields.AppendUnique(Fields{"grpc.response.type", fmt.Sprintf("%T", payload)})...,
128128
)
129129
return
130130
}

0 commit comments

Comments
 (0)