code: func writerScanner(reader io.ReadCloser, scanTokenSize int, printFunc func(args ...interface{})) {
  	scanner := bufio.NewScanner(reader)
  
  	if scanTokenSize > bufio.MaxScanTokenSize {
  		buf := make([]byte, bufio.MaxScanTokenSize)
  		scanner.Buffer(buf, scanTokenSize)
  	}
  
  	for scanner.Scan() {
  		printFunc(scanner.Text())
  	}
  	if err := scanner.Err(); err != nil {
  		Errorf("Error while reading from Writer: %s", err)
  	}
  	reader.Close()
  }
docs: // extract from github.com/Sirupsen/logrus/writer.go
  // Hack the buffer size