refactor:

- zap.Any("err", err) 更改为 zap.Error(err) 提高性能
This commit is contained in:
SliverHorn
2021-11-16 02:13:54 +08:00
parent 98703f192a
commit ed2e254cf4
24 changed files with 106 additions and 106 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ func OperationRecord() gin.HandlerFunc {
var err error
body, err = ioutil.ReadAll(c.Request.Body)
if err != nil {
global.GVA_LOG.Error("read body from request error:", zap.Any("err", err))
global.GVA_LOG.Error("read body from request error:", zap.Error(err))
} else {
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(body))
}
@@ -69,7 +69,7 @@ func OperationRecord() gin.HandlerFunc {
record.Resp = writer.body.String()
if err := operationRecordService.CreateSysOperationRecord(record); err != nil {
global.GVA_LOG.Error("create operation record error:", zap.Any("err", err))
global.GVA_LOG.Error("create operation record error:", zap.Error(err))
}
}
}