optimize log tool

This commit is contained in:
hoteas
2021-05-25 19:53:34 +08:00
parent 770f0a94c9
commit 740059075a
6 changed files with 41 additions and 27 deletions
+10
View File
@@ -1,7 +1,12 @@
package common
import (
"github.com/sirupsen/logrus"
)
// Error 框架层处理错误
type Error struct {
*logrus.Logger
error
}
@@ -13,5 +18,10 @@ func (that *Error) GetError() error {
func (that *Error) SetError(err error) {
that.error = err
if that.Logger != nil {
//that.Logger=log.GetLog("",false)
that.Logger.Warn(err)
}
return
}