lonnc/golang-nw — pull request #5 by xsleonard (2013-12-28 05:20:40+00:00)
Title: Log newline delimited statements separately

Newlines in data sent to stdout/stderr are escaped when logged by console.log. This patch logs each newline-delimited statement in data separately.

e.g. before:
[29718:1227/234957:INFO:CONSOLE(62)] ""App Started\nListening\n"", source: /tmp/.org.chromium.Chromium.7Zg40B/client.js (62)

e.g. after:
[29718:1227/234957:INFO:CONSOLE(62)] ""App Started"", source: /tmp/.org.chromium.Chromium.7Zg40B/client.js (62)
[29718:1227/234957:INFO:CONSOLE(62)] ""Listening"", source: /tmp/.org.chromium.Chromium.7Zg40B/client.js (62)

Empty lines are not logged to avoid the trailing newline.