Class: AppLogger::Middleware

Inherits:
Rack::CommonLogger
  • Object
show all
Defined in:
lib/app_logger/middleware.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, options) ⇒ Middleware

Returns a new instance of Middleware.



8
9
10
11
# File 'lib/app_logger/middleware.rb', line 8

def initialize(app, options)
  super(app, options[:logger])
  @log_level = options[:log_level] || Logger::INFO
end

Instance Attribute Details

#log_levelObject (readonly)

Returns the value of attribute log_level.



6
7
8
# File 'lib/app_logger/middleware.rb', line 6

def log_level
  @log_level
end