瀏覽代碼

Exit in log.Fatal

Signed-off-by: Vishal Rana <vr@labstack.com>
Vishal Rana 10 年之前
父節點
當前提交
7af4e9b5fe
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      log/log.go

+ 1 - 0
log/log.go

@@ -109,6 +109,7 @@ func (l *Logger) Error(msg interface{}, args ...interface{}) {
 
 func (l *Logger) Fatal(msg interface{}, args ...interface{}) {
 	l.log(FATAL, l.err, msg, args...)
+	os.Exit(1)
 }
 
 func SetPrefix(p string) {