refactor:log包增加处理机制

This commit is contained in:
Mmx
2021-05-05 10:46:04 +08:00
parent 9c274d4364
commit 4e4cdd35c2
6 changed files with 66 additions and 25 deletions

View File

@@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"io"
"log"
"os"
"regexp"
)
@@ -51,9 +50,9 @@ func Sha1(content string) string {
func ErrHandler(err error) {
if err != nil {
log.Println("运行出错,状态异常")
Log.Println("运行出错,状态异常")
if Global.Config.Settings.DemoMode {
log.Fatalln(err)
Log.Fatalln(err)
}
os.Exit(1)
}