code: func NewStdoutClient(filename string, prefix string) *StdoutClient {
  	var err error
  	// allow %HOST% in the prefix string
  	prefix = strings.Replace(prefix, "%HOST%", Hostname, 1)
  	var fh *os.File
  	if filename == "" {
  		fh = os.Stdout
  	} else {
  		fh, err = os.OpenFile(filename, os.O_WRONLY, 0644)
  		if nil != err {
  			fmt.Printf("Cannot open file '%s' for stats output: %s\n", filename, err.Error())
  		}
  	}
  	return &StdoutClient{
  		FD:     fh,
  		prefix: prefix,
  		Logger: log.New(os.Stdout, "[StdoutClient] ", log.Ldate|log.Ltime),
  	}
  }
docs: // NewStdoutClient - Factory