code: func parseCRILog(log []byte, msg *logMessage) error {
  	var err error
  	// Parse timestamp
  	idx := bytes.Index(log, delimiter)
  	if idx < 0 {
  		return fmt.Errorf("timestamp is not found")
  	}
  	msg.timestamp, err = time.Parse(timeFormat, string(log[:idx]))
  	if err != nil {
  		return fmt.Errorf("unexpected timestamp format %q: %v", timeFormat, err)
  	}
  
  	// Parse stream type
  	log = log[idx+1:]
  	idx = bytes.Index(log, delimiter)
  	if idx < 0 {
  		return fmt.Errorf("stream type is not found")
  	}
  	msg.stream = runtimeapi.LogStreamType(log[:idx])
  	if msg.stream != runtimeapi.Stdout && msg.stream != runtimeapi.Stderr {
  		return fmt.Errorf("unexpected stream type %q", msg.stream)
  	}
  
  	// Parse log tag
  	log = log[idx+1:]
  	idx = bytes.Index(log, delimiter)
  	if idx < 0 {
  		return fmt.Errorf("log tag is not found")
  	}
  	// Keep this forward compatible.
  	tags := bytes.Split(log[:idx], tagDelimiter)
  	partial := (runtimeapi.LogTag(tags[0]) == runtimeapi.LogTagPartial)
  	// Trim the tailing new line if this is a partial line.
  	if partial && len(log) > 0 && log[len(log)-1] == '\n' {
  		log = log[:len(log)-1]
  	}
  
  	// Get log content
  	msg.log = log[idx+1:]
  
  	return nil
  }
docs: // parseCRILog parses logs in CRI log format. CRI Log format example:
  //   2016-10-06T00:17:09.669794202Z stdout P log content 1
  //   2016-10-06T00:17:09.669794203Z stderr F log content 2