diff options
author | Wolfy-J <[email protected]> | 2018-10-14 13:07:42 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-10-14 13:07:42 +0300 |
commit | 7f11349b79a54848a23ebb1abedded37fcf583a1 (patch) | |
tree | c233b91182f42d0d6d1eb5e7b306930aae49a196 /cmd | |
parent | 0e68fbae9acd2325bc4f6b2fd3ae471e76216b4c (diff) |
split all warning messages by lines
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/util/debug.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cmd/util/debug.go b/cmd/util/debug.go index 7be258ec..ac3eaeca 100644 --- a/cmd/util/debug.go +++ b/cmd/util/debug.go @@ -29,10 +29,17 @@ func LogEvent(logger *logrus.Logger, event int, ctx interface{}) bool { // outputs switch event { case roadrunner.EventStderrOutput: - logger.Warning(Sprintf( - "<yellow>%s</reset>", - strings.Trim(string(ctx.([]byte)), "\r\n"), - )) + for _, line := range strings.Split(string(ctx.([]byte)), "\n") { + if line == "" { + continue + } + + logger.Warning(Sprintf( + "<yellow>%s</reset>", + strings.Trim(line, "\r\n"), + )) + } + return true } |