remove useless log handler
This commit is contained in:
parent
95fd9f66d6
commit
25bed3565f
@ -13,13 +13,6 @@ import (
|
|||||||
func SetupLogger(zapLog *zap.SugaredLogger) gin.HandlerFunc {
|
func SetupLogger(zapLog *zap.SugaredLogger) gin.HandlerFunc {
|
||||||
gin.DefaultWriter = log.AsWriter(zapLog, zap.DebugLevel)
|
gin.DefaultWriter = log.AsWriter(zapLog, zap.DebugLevel)
|
||||||
gin.DefaultErrorWriter = log.AsWriter(zapLog, zap.ErrorLevel)
|
gin.DefaultErrorWriter = log.AsWriter(zapLog, zap.ErrorLevel)
|
||||||
gin.DebugPrintRouteFunc = func(httpMethod, absolutePath, handlerName string, nuHandlers int) {
|
|
||||||
zapLog.Debugw("route",
|
|
||||||
"method", httpMethod,
|
|
||||||
"path", absolutePath,
|
|
||||||
"handler", handlerName,
|
|
||||||
"handlerNum", nuHandlers)
|
|
||||||
}
|
|
||||||
|
|
||||||
return func(c *gin.Context) {
|
return func(c *gin.Context) {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
|
Loading…
Reference in New Issue
Block a user