code: func NewLoggerWithFormatter(level string, formatter logrus.Formatter) (*logrus.Logger, error) {
  	logger := logrus.New()
  	// If there is an environment override, use that
  	envLogLevel := os.Getenv(envVarLogLevel)
  	if envLogLevel != "" {
  		level = envLogLevel
  	}
  
  	logLevel, err := logrus.ParseLevel(level)
  	if err != nil {
  		return nil, err
  	}
  
  	logger.Level = logLevel
  	if nil != formatter {
  		logger.Formatter = formatter
  	}
  	logger.Out = os.Stdout
  	return logger, nil
  }
docs: // NewLoggerWithFormatter returns a logger with the given formatter. If formatter
  // is nil, a TTY-aware formatter is used