class ReeLogger::Logger

def build

def build
  appenders = []
  if config.levels.file
    if is_blank(config.file_path)
      raise ArgumentError, "use ENV['LOG_FILE_PATH'] to specify path to log file"
    end
    appenders << FileAppender.new(
      config.levels.file, nil, config.file_path, auto_flush: config.file_auto_flush
    )
  end
  if config.levels.stdout
    appenders << StdoutAppender.new(
      config.levels.stdout, nil
    )
  end
  if config.rollbar.enabled
    opts = {}
    opts[:branch] = config.rollbar.branch if config.rollbar.branch
    opts[:host] = config.rollbar.host if config.rollbar.host
    appenders << RollbarAppender.new(
      config.levels.rollbar,
      access_token: config.rollbar.access_token,
      environment: config.rollbar.environment,
      **opts
    )
  end
  build_logger(
    appenders,
    ENV['APP_NAME'],
    RateLimiter.new(
      config.rate_limit.interval,
      config.rate_limit.max_count
    ),
    config.default_filter_words
  )
end