add fatal to stderr

This commit is contained in:
kevin 2020-08-25 16:59:14 +08:00
parent a32028c4fb
commit f3c367a323

View File

@ -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)
}