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
This commit is contained in:
@@ -71,6 +71,11 @@ func (v *verboseLog) Message(level MsgLevel, message string) {
|
||||
fmt.Fprintf(v.w, "%s%s\n", level.Prefix(), message)
|
||||
}
|
||||
|
||||
func (v *verboseLog) Write(p []byte) (int, error) {
|
||||
fmt.Fprint(v.w, string(p))
|
||||
return len(p), nil
|
||||
}
|
||||
|
||||
type errorLog struct {
|
||||
w io.WriteCloser
|
||||
|
||||
@@ -134,3 +139,8 @@ func (e *errorLog) Message(level MsgLevel, message string) {
|
||||
|
||||
fmt.Fprintf(e.w, "error: %s\n", message)
|
||||
}
|
||||
|
||||
func (e *errorLog) Write(p []byte) (int, error) {
|
||||
fmt.Fprint(e.w, string(p))
|
||||
return len(p), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user