github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/cf/trace/combined_printer.go (about) 1 package trace 2 3 type combinedPrinter []Printer 4 5 func CombinePrinters(printers []Printer) Printer { 6 return combinedPrinter(printers) 7 } 8 9 func (p combinedPrinter) Print(v ...interface{}) { 10 for _, printer := range p { 11 printer.Print(v...) 12 } 13 } 14 15 func (p combinedPrinter) Printf(format string, v ...interface{}) { 16 for _, printer := range p { 17 printer.Printf(format, v...) 18 } 19 } 20 21 func (p combinedPrinter) Println(v ...interface{}) { 22 for _, printer := range p { 23 printer.Println(v...) 24 } 25 } 26 27 func (p combinedPrinter) WritesToConsole() bool { 28 for _, printer := range p { 29 if printer.WritesToConsole() { 30 return true 31 } 32 } 33 34 return false 35 }