bugfix: d2util.Logger.Fatal() didn't return any value, when d2util.Logger.level < LogLevelFatal
This commit is contained in:
parent
fa4276156c
commit
12f9efded7
|
@ -136,12 +136,13 @@ func (l *Logger) Errorf(fmtMsg string, args ...interface{}) {
|
|||
|
||||
// Fatal logs an fatal error message and exits programm
|
||||
func (l *Logger) Fatal(msg string) {
|
||||
defer os.Exit(1)
|
||||
|
||||
if l == nil || l.level < LogLevelFatal {
|
||||
return
|
||||
}
|
||||
|
||||
l.print(LogLevelFatal, msg)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Fatalf formats and then logs a error message
|
||||
|
|
Loading…
Reference in New Issue