Move all output through StatusOutput

Write log output through StatusOutput so that the status implementation
can synchronize it with its own output.

Test: status_test.go
Change-Id: I917bdeeea4759a12b6b4aa6d6d86ee18a2771723
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index 58d8d34..f5276c3 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -109,7 +109,10 @@
 		os.Exit(1)
 	}
 
-	log := logger.New(c.stdio().Stdout())
+	output := terminal.NewStatusOutput(c.stdio().Stdout(), os.Getenv("NINJA_STATUS"),
+		build.OsEnvironment().IsEnvTrue("ANDROID_QUIET_BUILD"))
+
+	log := logger.New(output)
 	defer log.Cleanup()
 
 	ctx, cancel := context.WithCancel(context.Background())
@@ -122,8 +125,7 @@
 
 	stat := &status.Status{}
 	defer stat.Finish()
-	stat.AddOutput(terminal.NewStatusOutput(c.stdio().Stdout(), os.Getenv("NINJA_STATUS"),
-		build.OsEnvironment().IsEnvTrue("ANDROID_QUIET_BUILD")))
+	stat.AddOutput(output)
 	stat.AddOutput(trace.StatusTracer())
 
 	build.SetupSignals(log, cancel, func() {
@@ -137,7 +139,7 @@
 		Logger:  log,
 		Metrics: met,
 		Tracer:  trace,
-		Writer:  c.stdio().Stdout(),
+		Writer:  output,
 		Status:  stat,
 	}}