class Fluentdly::Rack::Middleware::Standard

Attributes

env[R]
status[R]
time[R]

Public Class Methods

call(*args) click to toggle source
# File lib/fluentdly/rack/middleware/standard.rb, line 8
def self.call *args
  formatter = new(*args)
  formatter.call
end
new(env, time, result) click to toggle source
# File lib/fluentdly/rack/middleware/standard.rb, line 13
def initialize env, time, result
  @env  = env
  @time = time

  @status, _headers, _body = result
end

Public Instance Methods

call() click to toggle source
# File lib/fluentdly/rack/middleware/standard.rb, line 20
def call
  "Completed #{method} #{path} (#{params}) with #{status} in #{time}ms"
end

Private Instance Methods

data() click to toggle source
# File lib/fluentdly/rack/middleware/standard.rb, line 38
def data
  @data ||= ::Rack::Request.new(env)
end
method() click to toggle source
# File lib/fluentdly/rack/middleware/standard.rb, line 26
def method
  data.request_method
end
params() click to toggle source
# File lib/fluentdly/rack/middleware/standard.rb, line 34
def params
  data.params
end
path() click to toggle source
# File lib/fluentdly/rack/middleware/standard.rb, line 30
def path
  data.path_info
end