Module: HTTParty::Logger

Defined in:
lib/httparty/logger/logger.rb,
lib/httparty/logger/curl_logger.rb,
lib/httparty/logger/apache_logger.rb

Defined Under Namespace

Classes: ApacheLogger, CurlLogger

Class Method Summary (collapse)

Class Method Details

+ (Object) build(logger, level, formatter)



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/httparty/logger/logger.rb', line 6

def self.build(logger, level, formatter)
  level  ||= :info
  format ||= :apache

  case formatter
  when :curl
    Logger::CurlLogger.new(logger, level)
  else
    Logger::ApacheLogger.new(logger, level)
  end
end