Explorar o código

add fatal to stderr

kevin %!s(int64=4) %!d(string=hai) anos
pai
achega
f3c367a323
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      core/logx/logs.go

+ 1 - 0
core/logx/logs.go

@@ -213,6 +213,7 @@ func Infof(format string, v ...interface{}) {
 func Must(err error) {
 	if err != nil {
 		msg := formatWithCaller(err.Error(), 3)
+		log.Print(msg)
 		output(severeLog, levelFatal, msg)
 		os.Exit(1)
 	}