diff --git a/util/log.go b/util/log.go index 54314b6..69fbd5a 100644 --- a/util/log.go +++ b/util/log.go @@ -5,7 +5,6 @@ import ( "github.com/Mmx233/tool" "log" "os" - "runtime" "strings" "time" ) @@ -82,11 +81,3 @@ func (c *loG) Warn(a ...interface{}) { func (c *loG) Fatal(a ...interface{}) { c.print(true, append([]interface{}{"[FATAL] "}, a...)...) } - -func (c *loG) CatchRecover() { - if e := recover(); e != nil { - c.Debug("发生恐慌") - var buf [4096]byte - c.Fatal(e, "\n", string(buf[:runtime.Stack(buf[:], false)])) - } -}