do not use \r in -quiet mode when printing status messages

master
Oliver Tonnhofer 2014-02-25 08:33:38 +01:00
parent ff6207d200
commit dab06de51c
1 changed files with 9 additions and 3 deletions

View File

@ -210,9 +210,15 @@ func (l *LogBroker) printRecord(record Record) {
func (l *LogBroker) printProgress(progress string) { func (l *LogBroker) printProgress(progress string) {
l.printPrefix() l.printPrefix()
fmt.Print(progress) fmt.Print(progress)
fmt.Print("\r") if l.quiet {
l.lastProgress = progress fmt.Print("\n")
l.newline = false l.lastProgress = ""
l.newline = true
} else {
fmt.Print("\r")
l.lastProgress = progress
l.newline = false
}
} }
func Shutdown() { func Shutdown() {