From fdae7ddaf512415df63fb429b97545928641c657 Mon Sep 17 00:00:00 2001 From: Madhav Puri Date: Tue, 26 May 2015 16:42:49 -0700 Subject: [PATCH] Fix Fatal*() function of logger to match the behavior of Fatal*() functions of entry Signed-off-by: Madhav Puri --- logger.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/logger.go b/logger.go index 3c07ea7..292b0b2 100644 --- a/logger.go +++ b/logger.go @@ -102,6 +102,7 @@ func (logger *Logger) Fatalf(format string, args ...interface{}) { if logger.Level >= FatalLevel { NewEntry(logger).Fatalf(format, args...) } + os.Exit(1) } func (logger *Logger) Panicf(format string, args ...interface{}) { @@ -148,6 +149,7 @@ func (logger *Logger) Fatal(args ...interface{}) { if logger.Level >= FatalLevel { NewEntry(logger).Fatal(args...) } + os.Exit(1) } func (logger *Logger) Panic(args ...interface{}) { @@ -194,6 +196,7 @@ func (logger *Logger) Fatalln(args ...interface{}) { if logger.Level >= FatalLevel { NewEntry(logger).Fatalln(args...) } + os.Exit(1) } func (logger *Logger) Panicln(args ...interface{}) {