code: func (p *provisioner) Output(output string) {
  	logFile := path.Join(logfileDir, p.NodeName)
  	f, err := os.OpenFile(logFile, os.O_APPEND|os.O_WRONLY, 0666)
  	if err != nil {
  		log.Printf("Error creating logfile %s: %v", logFile, err)
  		return
  	}
  	defer f.Close()
  
  	// These steps are needed to remove any ANSI escape codes used to colorize
  	// the output and to make sure we have proper line endings before writing
  	// the string to the logfile.
  	re := regexp.MustCompile(`\x1b\[[0-9;]+m`)
  	output = re.ReplaceAllString(output, "")
  	output = strings.Replace(output, "\r", "\n", -1)
  
  	if _, err := f.WriteString(output); err != nil {
  		log.Printf("Error writing output to logfile %s: %v", logFile, err)
  	}
  
  	if err := f.Sync(); err != nil {
  		log.Printf("Error saving logfile %s to disk: %v", logFile, err)
  	}
  }
docs: // Output implementation of terraform.UIOutput interface