code: func (c *ContainerServer) GetLogs(container string, logChan chan string, opts LogOptions) error {
  	defer close(logChan)
  	// Get the full ID of the container
  	ctr, err := c.LookupContainer(container)
  	if err != nil {
  		return err
  	}
  
  	containerID := ctr.ID()
  	sandbox := ctr.Sandbox()
  	if sandbox == "" {
  		sandbox = containerID
  	}
  	// Read the log line by line and pass it into the pipe
  	logsFile := path.Join(c.config.LogDir, sandbox, containerID+".log")
  
  	seekInfo := &tail.SeekInfo{Offset: 0, Whence: 0}
  	if opts.Tail > 0 {
  		// seek to correct position in logs files
  		seekInfo.Offset = int64(opts.Tail)
  		seekInfo.Whence = 2
  	}
  
  	t, err := tail.TailFile(logsFile, tail.Config{Follow: false, ReOpen: false, Location: seekInfo})
  	for line := range t.Lines {
  		if since, err := logSinceTime(opts.SinceTime, line.Text); err != nil || !since {
  			continue
  		}
  		logMessage := line.Text[secondSpaceIndex(line.Text):]
  		logChan <- logMessage
  	}
  	return err
  }
docs: // GetLogs gets each line of a log file and, if it matches the criteria in logOptions, sends it down logChan