Skip to content

Commit

Permalink
do not use \r in -quiet mode when printing status messages
Browse files Browse the repository at this point in the history
  • Loading branch information
olt committed Feb 25, 2014
1 parent ff6207d commit dab06de
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions logging/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit dab06de

Please sign in to comment.