diff --git a/pkg/log/logger.go b/pkg/log/logger.go index efee7ef8800d..f46eb46fc87f 100644 --- a/pkg/log/logger.go +++ b/pkg/log/logger.go @@ -67,7 +67,8 @@ func Errorf(format string, args ...any) { slog.Default().Error(fmt.Sprintf(forma // Fatal for logging fatal errors func Fatal(msg string, args ...any) { - slog.Default().Log(context.Background(), LevelFatal, msg, args...) + // Fatal errors should be logged to stderr even if the logger is disabled. + New(NewHandler(os.Stderr, &Options{})).Log(context.Background(), LevelFatal, msg, args...) os.Exit(1) }