feat 优化logger使用

This commit is contained in:
linwenxiang
2021-05-19 19:31:04 +08:00
parent d3fa3ecf6c
commit e23a1f615f
7 changed files with 24 additions and 25 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ func LoggerToFile() gin.HandlerFunc {
"method": reqMethod,
"uri": reqUri,
}
log.Info(logData)
log.WithFields(logData).Info()
//l := logger.Logger{Logger: log.Fields(logData)}
//l.Info(logData)
if c.Request.Method != "GET" && c.Request.Method != "OPTIONS" && config.LoggerConfig.EnabledDB {