Class: Sinatra::Syslog
- Inherits:
-
Rack::CommonLogger
- Object
- Rack::CommonLogger
- Sinatra::Syslog
- Defined in:
- lib/sinatra-syslog.rb,
lib/sinatra/syslog/logger.rb
Defined Under Namespace
Classes: Logger
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, ident) ⇒ Syslog
constructor
A new instance of Syslog.
Constructor Details
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/sinatra-syslog.rb', line 10 def call env env['rack.logger'] = @logger env['rack.errors'] = @logger env['sinatra.commonlogger'] = true status, headers, body = super [status, headers, body] ensure body.close if body.respond_to? :close end |