use logrus to project default log tools

This commit is contained in:
hoteas
2021-05-25 05:08:17 +08:00
parent 9bc930750d
commit df07afb744
15 changed files with 491 additions and 457 deletions
+5 -13
View File
@@ -1,25 +1,17 @@
package common
//框架层处理错误
// Error 框架层处理错误
type Error struct {
error
err error
}
func (this *Error) GetError() error {
func (that *Error) GetError() error {
return this.error
return that.error
}
func (this *Error) SetError(err error, loglevel ...int) {
this.error = nil
if err == nil {
this.error = err
this.err = err
return
}
this.error = err
func (that *Error) SetError(err error) {
that.error = err
return
}