Skip to content

Commit

Permalink
Add "Error: " prefix to fatal errors from k3s app entry points
Browse files Browse the repository at this point in the history
Makes logged output more consistent when k3s fails during initialization

Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Dec 20, 2024
1 parent 763188d commit 68f26fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
2 changes: 1 addition & 1 deletion cmd/k3s/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 68f26fe

Please sign in to comment.