Class: Lumberjack::Rack::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/lumberjack/rack/context.rb

Overview

Middleware to create a global context for Lumberjack for the scope of a rack request.

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Context

Returns a new instance of Context.



7
8
9
# File 'lib/lumberjack/rack/context.rb', line 7

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
15
# File 'lib/lumberjack/rack/context.rb', line 11

def call(env)
  Lumberjack.context do
    @app.call(env)
  end
end