Method: Rack::CommonLogger#initialize

Defined in:
lib/rack/common_logger.rb

#initialize(app, logger = nil) ⇒ CommonLogger

logger can be any object that supports the write or << methods, which includes the standard library Logger. These methods are called with a single string argument, the log message. If logger is nil, CommonLogger will fall back env['rack.errors'].

[View source]

29
30
31
32
# File 'lib/rack/common_logger.rb', line 29

def initialize(app, logger = nil)
  @app = app
  @logger = logger
end