diff --git a/main.go b/main.go index d61ef75..a87ee8a 100644 --- a/main.go +++ b/main.go @@ -69,7 +69,7 @@ func init() { conf = getConfig() if conf == nil { - return + os.Exit(1) } logFormatter := &easy.Formatter{ @@ -82,6 +82,11 @@ func init() { panic(err) } + // 更加彻底的调试 将在标准输出中打印执行行数 + if conf.Debug { + log.SetReportCaller(true) + } + log.AddHook(global.NewLocalHook(w, logFormatter, global.GetLogLevel(conf.LogLevel)...)) if !global.PathExists(global.IMAGE_PATH) {