Skip to content

Commit

Permalink
Fix overwritten logger in zerolog example (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
longshine authored Apr 26, 2023
1 parent 9187d46 commit cb96b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interceptors/logging/examples/zerolog/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// This code is simple enough to be copied and not imported.
func InterceptorLogger(l zerolog.Logger) logging.Logger {
return logging.LoggerFunc(func(ctx context.Context, lvl logging.Level, msg string, fields ...any) {
l = l.With().Fields(fields).Logger()
l := l.With().Fields(fields).Logger()

switch lvl {
case logging.LevelDebug:
Expand Down

0 comments on commit cb96b57

Please sign in to comment.