Skip to content

Commit

Permalink
chore: remove duplication log to msg (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamacro committed Mar 1, 2024
1 parent 4c79a60 commit 35a621a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions zap.go
Expand Up @@ -89,12 +89,12 @@ func GinzapWithConfig(logger ZapLogger, conf *Config) gin.HandlerFunc {
logger.Error(e, fields...)
}
} else {
zl, ok := logger.(*zap.Logger)
if ok {
zl.Log(conf.DefaultLevel, path, fields...)
} else {
logger.Error(path, fields...)
}
zl, ok := logger.(*zap.Logger)
if ok {
zl.Log(conf.DefaultLevel, "", fields...)
} else {
logger.Error(path, fields...)
}
}
}
}
Expand Down

0 comments on commit 35a621a

Please sign in to comment.