code: func NewCRILogger(path string, w io.Writer, stream StreamType, maxLen int) (io.WriteCloser, <-chan struct{}) {
  	logrus.Debugf("Start writing stream %q to log file %q", stream, path)
  	prc, pwc := io.Pipe()
  	stop := make(chan struct{})
  	go func() {
  		redirectLogs(path, prc, w, stream, maxLen)
  		close(stop)
  	}()
  	return pwc, stop
  }
docs: // NewCRILogger returns a write closer which redirect container log into
  // log file, and decorate the log line into CRI defined format. It also
  // returns a channel which indicates whether the logger is stopped.
  // maxLen is the max length limit of a line. A line longer than the
  // limit will be cut into multiple lines.