Add Fatal() and Fatalf() to log.go

This commit is contained in:
Elara 2022-10-07 03:23:43 +00:00
parent 1726280154
commit 527df9aa48
1 changed files with 10 additions and 0 deletions

View File

@ -56,3 +56,13 @@ func Error(msg string) logger.LogBuilder {
func Errorf(format string, v ...any) logger.LogBuilder {
return Logger.Errorf(format, v...)
}
// Fatal creates a new fatal event with the given message
func Fatal(msg string) logger.LogBuilder {
return Logger.Fatal(msg)
}
// Fatalf creates a new fatal event with the formatted message
func Fatalf(format string, v ...any) logger.LogBuilder {
return Logger.Fatalf(format, v...)
}