Move all status output to stdout

I've noticed a few instances of interleaved status messages in between
lines in a terminal/Writer.Print call on our build servers. Since
there's a lock protecting everything we write, I've got to assume this
is a stdout vs stderr problem. Ninja had always been outputing to
stdout, except for error messages, which are now marked with FAILED:
like failed actions.

Test: m blueprint_tools
Test: m missing
Change-Id: Idf8320d40694abf212c902c63a9703e4440ffb7a
This commit is contained in:
Dan Willemsen
2018-07-12 21:26:10 -07:00
parent 9611199b94
commit f78a73444e
2 changed files with 7 additions and 5 deletions

View File

@@ -45,7 +45,9 @@ func NewStatusOutput(w Writer, statusFormat string) status.StatusOutput {
}
func (s *statusOutput) Message(level status.MsgLevel, message string) {
if level > status.StatusLvl {
if level >= status.ErrorLvl {
s.writer.Print(fmt.Sprintf("FAILED: %s", message))
} else if level > status.StatusLvl {
s.writer.Print(fmt.Sprintf("%s%s", level.Prefix(), message))
} else if level == status.StatusLvl {
s.writer.StatusLine(message)