diff --git a/app/cmd/process.go b/app/cmd/process.go index 947bfe3cd..eb2f767c6 100644 --- a/app/cmd/process.go +++ b/app/cmd/process.go @@ -44,7 +44,7 @@ func ProcessCreateCmd() cli.Command { }, Action: func(c *cli.Context) { if err := createProcess(c); err != nil { - logrus.Fatalf("Error running process create command: %v.", err) + logrus.WithError(err).Fatal("Error running process create command") } }, } @@ -75,7 +75,7 @@ func ProcessDeleteCmd() cli.Command { }, Action: func(c *cli.Context) { if err := deleteProcess(c); err != nil { - logrus.Fatalf("Error running process delete command: %v.", err) + logrus.WithError(err).Fatal("Error running process delete command") } }, } @@ -105,7 +105,7 @@ func ProcessGetCmd() cli.Command { }, Action: func(c *cli.Context) { if err := getProcess(c); err != nil { - logrus.Fatalf("Error running process get command: %v.", err) + logrus.WithError(err).Fatal("Error running process get command") } }, } @@ -131,7 +131,7 @@ func ProcessListCmd() cli.Command { ShortName: "ls", Action: func(c *cli.Context) { if err := listProcess(c); err != nil { - logrus.Fatalf("Error running engine stop command: %v.", err) + logrus.WithError(err).Fatal("Error running engine stop command") } }, } @@ -176,7 +176,7 @@ func ProcessReplaceCmd() cli.Command { }, Action: func(c *cli.Context) { if err := replaceProcess(c); err != nil { - logrus.Fatalf("Error running engine replace command: %v.", err) + logrus.WithError(err).Fatal("Error running engine replace command") } }, } diff --git a/app/cmd/start.go b/app/cmd/start.go index fd7336365..c28f273f1 100644 --- a/app/cmd/start.go +++ b/app/cmd/start.go @@ -46,7 +46,7 @@ func StartCmd() cli.Command { }, Action: func(c *cli.Context) { if err := start(c); err != nil { - logrus.Fatalf("Failed to run start command: %v.", err) + logrus.WithError(err).Fatal("Failed to run start command") } }, } diff --git a/app/cmd/version.go b/app/cmd/version.go index fc58e06c7..8ff2feb6d 100644 --- a/app/cmd/version.go +++ b/app/cmd/version.go @@ -20,7 +20,7 @@ func VersionCmd() cli.Command { }, Action: func(c *cli.Context) { if err := version(c); err != nil { - logrus.Fatalln("Error running info command:", err) + logrus.WithError(err).Fatal("Error running info command") } }, } diff --git a/main.go b/main.go index 4d6556adc..3feb2b099 100644 --- a/main.go +++ b/main.go @@ -53,6 +53,6 @@ func main() { cmd.VersionCmd(), } if err := a.Run(os.Args); err != nil { - logrus.Fatal("Error when executing command: ", err) + logrus.WithError(err).Fatal("Error when executing command") } }