Add Fatalf to standard logger-ish

This commit is contained in:
2024-10-12 11:11:50 -07:00
parent d6a77f4003
commit 4367ef9c29
2 changed files with 9 additions and 1 deletions

View File

@@ -34,3 +34,8 @@ func (l stdLoggerish) Println(msg ...interface{}) {
func (l stdLoggerish) Printf(msg string, args ...interface{}) {
l.f(l.key, "msg", fmt.Sprintf(msg, args...))
}
func (l stdLoggerish) Fatalf(msg string, args ...interface{}) {
l.log.Error(l.key, "msg", fmt.Sprintf(msg, args...))
panic("fatal error") // todo: does this make sense at all?
}