Skip to content

Commit 68c68b8

Browse files
author
Matthew Fisher
committed
fix(controller): use django HttpResponse for logs
Django Rest Framework will wrap the string with quotes because of the JSONRenderer. Django's HttpResponse class handles the application logs as we expect it to. This change reflects the change in the controller to split logs properly by the newline character.
1 parent 6c176d2 commit 68c68b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/apps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func AppLogs(appID string, lines int) error {
168168

169169
// printLogs prints each log line with a color matched to its category.
170170
func printLogs(logs string) error {
171-
for _, log := range strings.Split(logs, `\\n\\n`) {
171+
for _, log := range strings.Split(logs, "\n") {
172172
category := "unknown"
173173
parts := strings.Split(strings.Split(log, " -- ")[0], " ")
174174
category = parts[0]

0 commit comments

Comments
 (0)