Finish refining all the logger things.

This commit is contained in:
zicla
2018-11-30 15:32:28 +08:00
parent 4af940647d
commit 6485e3b48e
19 changed files with 162 additions and 146 deletions

View File

@ -1,6 +1,8 @@
package rest
import "net/http"
import (
"net/http"
)
type IBean interface {
Init()
@ -9,11 +11,11 @@ type IBean interface {
}
type Bean struct {
logger *Logger
}
func (this *Bean) Init() {
this.logger = LOGGER
}
//处理错误的统一方法
@ -27,5 +29,3 @@ func (this *Bean) PanicError(err error) {
func (this *Bean) PanicWebError(msg string, httpStatusCode int) {
panic(&WebError{Msg: msg, Code: httpStatusCode})
}
//处理日志的统一方法。