Fix errorProtoLog error messages
Use Printf instead of Println for formatted strings, and pass
the filename instead of the proto.
Test: cuj_tests
Change-Id: Id261b5a34304a0caa61faa1f3bbc388aacdd25a6
diff --git a/ui/status/log.go b/ui/status/log.go
index 9090f49..d407248 100644
--- a/ui/status/log.go
+++ b/ui/status/log.go
@@ -180,12 +180,12 @@
func (e *errorProtoLog) Flush() {
data, err := proto.Marshal(&e.errorProto)
if err != nil {
- e.log.Println("Failed to marshal build status proto: %v", err)
+ e.log.Printf("Failed to marshal build status proto: %v\n", err)
return
}
err = ioutil.WriteFile(e.filename, []byte(data), 0644)
if err != nil {
- e.log.Println("Failed to write file %s: %v", e.errorProto, err)
+ e.log.Printf("Failed to write file %s: %v\n", e.filename, err)
}
}