Skip to content

Commit

Permalink
Fix logging Example : log only first field (#694)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre PERRIER-RIDET <pierre.perrier-ridet@intrinsec.com>
  • Loading branch information
arckadious and Pierre PERRIER-RIDET authored Feb 2, 2024
1 parent c2940ba commit 3782759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interceptors/logging/examples/logrus/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func InterceptorLogger(l logrus.FieldLogger) logging.Logger {
return logging.LoggerFunc(func(_ context.Context, lvl logging.Level, msg string, fields ...any) {
f := make(map[string]any, len(fields)/2)
i := logging.Fields(fields).Iterator()
if i.Next() {
for i.Next() {
k, v := i.At()
f[k] = v
}
Expand Down

0 comments on commit 3782759

Please sign in to comment.