Write writes data to the underlying io.Writer and logs it.
(p []byte)
| 39 | |
| 40 | // Write writes data to the underlying io.Writer and logs it. |
| 41 | func (l *IOLogger) Write(p []byte) (n int, err error) { |
| 42 | if l.writer == nil { |
| 43 | return 0, io.ErrClosedPipe |
| 44 | } |
| 45 | l.logger.Info("[stdout]: sending bytes", "count", len(p), "data", string(p)) |
| 46 | return l.writer.Write(p) |
| 47 | } |
| 48 | |
| 49 | func (l *IOLogger) Close() error { |
| 50 | var errReader, errWriter error |
no outgoing calls