Skip to content

Commit a74d561

Browse files
author
Jonathan Chauncey
committed
fix(logger): Return non-zero exit code when deis logs fails
fixes #401 Create a user friendly error message and return that instead of a string.
1 parent 0f37d00 commit a74d561

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • client/controller/models/apps

client/controller/models/apps/apps.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ func Logs(c *client.Client, appID string, lines int) (string, error) {
9898
body, err := c.BasicRequest("GET", u, nil)
9999

100100
if err != nil || len(body) < 1 {
101-
return fmt.Sprintf(
101+
return "", fmt.Errorf(
102102
`There are currently no log messages. Please check the following things:
103103
1) Logger and fluentd pods are running.
104104
2) If you just installed the logger components via the chart, please make sure you restarted the workflow pod.
105105
3) The application is writing logs to the logger component.
106106
You can verify that logs are appearing in the logger component by issuing the following command:
107107
curl http://<log service ip>:8088/logs/%s on a kubernetes host.
108-
To get the service ip you can do the following: kubectl get svc deis-logger --namespace=deis`, appID), nil
108+
To get the service ip you can do the following: kubectl get svc deis-logger --namespace=deis`, appID)
109109
}
110110

111111
// We need to trim a few characters off the front and end of the string

0 commit comments

Comments
 (0)