class HTTParty::Logger::ApacheFormatter

:nodoc:

def content_length

def content_length
  response.respond_to?(:headers) ? response.headers['Content-Length'] : response['Content-Length']
end

def current_time

def current_time
  Time.now.strftime('%Y-%m-%d %H:%M:%S %z')
end

def format(request, response)

def format(request, response)
  @request = request
  @response = response
  logger.public_send level, message
end

def http_method

def http_method
  request.http_method.name.split('::').last.upcase
end

def initialize(logger, level)

def initialize(logger, level)
  @logger = logger
  @level  = level.to_sym
end

def message

def message
  "[#{TAG_NAME}] [#{current_time}] #{response.code} \"#{http_method} #{path}\" #{content_length || '-'} "
end

def path

def path
  request.path.to_s
end