fix data map

github-ci-wip
Fabrice Aneche 2021-01-27 10:26:18 -05:00 committed by Jack Christensen
parent 9b59dd0346
commit 14050e286d
1 changed files with 3 additions and 5 deletions

View File

@ -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 {