func (w *logProxy) Write(p []byte) (int, error) {
	header := [8]byte{}
	header[0] = byte(w.prefix)
	binary.BigEndian.PutUint32(header[4:], uint32(len(p)))
	w.out.Write(header[:])
	return w.out.Write(p)
}
Write will write data to the configured writer, using the correct header.
package ioproxy
import (
	"encoding/binary"
	"io"
)
type StdType byte
const (
	Stdin StdType = iota
	Stdout
	Stderr
)
type logProxy struct {
	io.Writer
	out    io.Writer
	prefix StdType
}
func New(w io.Writer, prefix StdType) io.Writer {
	return &logProxy{out: w, prefix: prefix}
}