From dab06de51cd906476bbd2d9fec4b6faf563bf142 Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Tue, 25 Feb 2014 08:33:38 +0100 Subject: [PATCH] do not use \r in -quiet mode when printing status messages --- logging/logger.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/logging/logger.go b/logging/logger.go index 39572b6..913f79d 100644 --- a/logging/logger.go +++ b/logging/logger.go @@ -210,9 +210,15 @@ func (l *LogBroker) printRecord(record Record) { func (l *LogBroker) printProgress(progress string) { l.printPrefix() fmt.Print(progress) - fmt.Print("\r") - l.lastProgress = progress - l.newline = false + if l.quiet { + fmt.Print("\n") + l.lastProgress = "" + l.newline = true + } else { + fmt.Print("\r") + l.lastProgress = progress + l.newline = false + } } func Shutdown() {