mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-10-02 16:15:58 -04:00
Merge pull request #1082 from gucio321/hotfix
bugfix: d2util.Logger.Fatal()
This commit is contained in:
commit
97516d5da9
@ -136,12 +136,13 @@ func (l *Logger) Errorf(fmtMsg string, args ...interface{}) {
|
|||||||
|
|
||||||
// Fatal logs an fatal error message and exits programm
|
// Fatal logs an fatal error message and exits programm
|
||||||
func (l *Logger) Fatal(msg string) {
|
func (l *Logger) Fatal(msg string) {
|
||||||
|
defer os.Exit(1)
|
||||||
|
|
||||||
if l == nil || l.level < LogLevelFatal {
|
if l == nil || l.level < LogLevelFatal {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
l.print(LogLevelFatal, msg)
|
l.print(LogLevelFatal, msg)
|
||||||
os.Exit(1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fatalf formats and then logs a error message
|
// Fatalf formats and then logs a error message
|
||||||
|
Loading…
Reference in New Issue
Block a user