mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2026-11-13 08:37:15 +00:00
fix: fatal logger notification
This commit is contained in:
1 parent
d5a0adc981
commit
d8c73560b8
1 file changed
+6
@@ -54,7 +54,13 @@ func Error(msg string, args ...interface{}) {
|
||||
|
||||
func Fatal(msg string, args ...interface{}) {
|
||||
log.SetOutput(os.Stdout)
|
||||
// Format message if there are additional arguments
|
||||
formattedMessage := msg
|
||||
if len(args) > 0 {
|
||||
formattedMessage = fmt.Sprintf(msg, args...)
|
||||
}
|
||||
logWithCaller("ERROR", msg, args...)
|
||||
NotifyError(formattedMessage)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user