From 5965b70b39eff85388ad275aa1660e1e597f685e Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 31 Aug 2020 02:05:21 -0400 Subject: [PATCH] fix: do not log empty messages --- plugins/common/log.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/common/log.go b/plugins/common/log.go index a1715999c..00983cb83 100644 --- a/plugins/common/log.go +++ b/plugins/common/log.go @@ -81,8 +81,10 @@ func LogVerboseQuietContainerLogs(containerID string) { LogExclaim(fmt.Sprintf("Failed to fetch container logs: %s", containerID)) } - for _, line := range strings.Split(string(b), "\n") { - LogVerboseQuiet(line) + for _, line := range strings.Split(strings.TrimSpace(string(b)), "\n") { + if line != "" { + LogVerboseQuiet(line) + } } }