add Panic & Panicf to logger (#1258)

* add Panic & Panicf to logger
This commit is contained in:
Eric 2020-02-25 22:44:29 +08:00 committed by GitHub
parent dcf859098b
commit 53c3bff819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,6 +109,14 @@ func Errorf(template string, args ...interface{}) {
DefaultLogger.Logf(ErrorLevel, template, args...) DefaultLogger.Logf(ErrorLevel, template, args...)
} }
func Panic(args ...interface{}) {
DefaultLogger.Log(PanicLevel, args...)
}
func Panicf(template string, args ...interface{}) {
DefaultLogger.Logf(PanicLevel, template, args...)
}
func Fatal(args ...interface{}) { func Fatal(args ...interface{}) {
DefaultLogger.Log(FatalLevel, args...) DefaultLogger.Log(FatalLevel, args...)
} }