code: func (w *bothWriter) logAtLevel(level syslog.Priority, msg string) {
  	var prefix string
  	var err error
  
  	const red = "\033[31m\033[1m"
  	const yellow = "\033[33m"
  
  	switch syslogAllowed := int(level) <= w.syslogLevel; level {
  	case syslog.LOG_ERR:
  		if syslogAllowed {
  			err = w.Err(msg)
  		}
  		prefix = red + "E"
  	case syslog.LOG_WARNING:
  		if syslogAllowed {
  			err = w.Warning(msg)
  		}
  		prefix = yellow + "W"
  	case syslog.LOG_INFO:
  		if syslogAllowed {
  			err = w.Info(msg)
  		}
  		prefix = "I"
  	case syslog.LOG_DEBUG:
  		if syslogAllowed {
  			err = w.Debug(msg)
  		}
  		prefix = "D"
  	default:
  		err = w.Err(fmt.Sprintf("%s (unknown logging level: %d)", msg, int(level)))
  	}
  
  	if err != nil {
  		fmt.Fprintf(os.Stderr, "Failed to write to syslog: %s (%s)\n", msg, err)
  	}
  
  	var reset string
  	if strings.HasPrefix(prefix, "\033") {
  		reset = "\033[0m"
  	}
  
  	if int(level) <= w.stdoutLevel {
  		fmt.Printf("%s%s %s %s%s\n",
  			prefix,
  			w.clk.Now().Format("150405"),
  			path.Base(os.Args[0]),
  			msg,
  			reset)
  	}
  }
docs: // Log the provided message at the appropriate level, writing to
  // both stdout and the Logger