mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-20 23:47:16 -05:00
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…
x
Reference in New Issue
Block a user