Skip to content

Commit

Permalink
fix data map
Browse files Browse the repository at this point in the history
  • Loading branch information
akhenakh authored and jackc committed Jan 27, 2021
1 parent 9b59dd0 commit 14050e2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions log/kitlogadapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ func NewLogger(l log.Logger) *Logger {
}

func (l *Logger) Log(ctx context.Context, level pgx.LogLevel, msg string, data map[string]interface{}) {
var logger log.Logger
if data != nil {
logger = log.With(l.l, data)
} else {
logger = l.l
logger := l.l
for k, v := range data {
logger = log.With(logger, k, v)
}

switch level {
Expand Down

0 comments on commit 14050e2

Please sign in to comment.