Skip to content

Commit d4f9548

Browse files
author
Jonathan Chauncey
committed
fix(logger): Split on the double new lines when printing log messages
1 parent ced0c44 commit d4f9548

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

models/apps/apps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func Logs(c *client.Client, appID string, lines int) (string, error) {
108108
}
109109

110110
// We need to trim a few characters off the front and end of the string
111-
return body[3 : len(body)-2], nil
111+
return body[2 : len(body)-1], nil
112112
}
113113

114114
// Run one time command in an app.

models/apps/apps_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,11 @@ func TestAppsLogs(t *testing.T) {
337337
tests := []testExpected{
338338
{
339339
Input: -1,
340-
Expected: "test foo bar",
340+
Expected: "\"test foo bar\"",
341341
},
342342
{
343343
Input: 1,
344-
Expected: "test",
344+
Expected: "\"test\"",
345345
},
346346
}
347347

0 commit comments

Comments
 (0)