Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
rymurr committed Nov 27, 2023
1 parent 5f69e9a commit 0a1b573
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zap.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ func GinzapWithConfig(logger ZapLogger, conf *Config) gin.HandlerFunc {
logger.Error(e, fields...)
}
} else {
logger.Log(conf.DefaultLevel, path, fields...)
zl, ok := logger.(*zap.Logger)
if ok {
zl.Log(conf.DefaultLevel, path, fields...)
} else {
logger.Error(path, fields...)
}
}
}
}
Expand Down

0 comments on commit 0a1b573

Please sign in to comment.