From 68f26fe9acfe29a51074fc7f78876510d67328ab Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Mon, 1 Jul 2024 17:45:25 +0000 Subject: [PATCH] Add "Error: " prefix to fatal errors from k3s app entry points Makes logged output more consistent when k3s fails during initialization Signed-off-by: Brad Davidson --- cmd/agent/main.go | 2 +- cmd/k3s/main.go | 2 +- cmd/server/main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/agent/main.go b/cmd/agent/main.go index 1ed96710bb..97053f2ab0 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -19,6 +19,6 @@ func main() { } if err := app.Run(configfilearg.MustParse(os.Args)); err != nil && !errors.Is(err, context.Canceled) { - logrus.Fatal(err) + logrus.Fatalf("Error: %v", err) } } diff --git a/cmd/k3s/main.go b/cmd/k3s/main.go index 90eae7268e..9627f20f7c 100644 --- a/cmd/k3s/main.go +++ b/cmd/k3s/main.go @@ -89,7 +89,7 @@ func main() { } if err := app.Run(os.Args); err != nil && !errors.Is(err, context.Canceled) { - logrus.Fatal(err) + logrus.Fatalf("Error: %v", err) } } diff --git a/cmd/server/main.go b/cmd/server/main.go index 584ab486a8..193cdc0fd4 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -80,6 +80,6 @@ func main() { } if err := app.Run(configfilearg.MustParse(os.Args)); err != nil && !errors.Is(err, context.Canceled) { - logrus.Fatal(err) + logrus.Fatalf("Error: %v", err) } }