Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff27ce4c authored by Colin Cross's avatar Colin Cross
Browse files

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
parent 28f527c3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -180,12 +180,12 @@ func (e *errorProtoLog) FinishAction(result ActionResult, counts Counts) {
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)
	}
}