Padrino::Loggger::Rack forwards every request to an app given, and
logs a line in the Apache common log format to the logger, or
rack.errors by default.
Public Class Methods
new(app, uri_root)click to toggle source
# File lib/padrino-core/logger.rb, line 297definitialize(app, uri_root) # @private@app = app@uri_root = uri_root.sub(/\/$/,"")
end
Public Instance Methods
call(env)click to toggle source
# File lib/padrino-core/logger.rb, line 302defcall(env) # @privateenv['rack.logger'] = Padrino.loggerenv['rack.errors'] = Padrino.logger.logbegan_at = Time.nowstatus, header, body = @app.call(env)
log(env, status, header, began_at)
[status, header, body]
end