summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/log/logger_global.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/log/logger_global.go b/modules/log/logger_global.go
index 994acfedbb..6ce8b70fed 100644
--- a/modules/log/logger_global.go
+++ b/modules/log/logger_global.go
@@ -57,11 +57,13 @@ func Critical(format string, v ...any) {
Log(1, ERROR, format, v...)
}
+var OsExiter = os.Exit
+
// Fatal records fatal log and exit process
func Fatal(format string, v ...any) {
Log(1, FATAL, format, v...)
GetManager().Close()
- os.Exit(1)
+ OsExiter(1)
}
func GetLogger(name string) Logger {