Class: Rack::RackLogger
- Inherits:
-
Object
- Object
- Rack::RackLogger
- Defined in:
- lib/simple_rack_logger/rack_logger.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(app, logger, *filters) ⇒ RackLogger
constructor
A new instance of RackLogger.
Constructor Details
#initialize(app, logger, *filters) ⇒ RackLogger
Returns a new instance of RackLogger.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/simple_rack_logger/rack_logger.rb', line 7 def initialize(app, logger, *filters) @app = app @logger = logger @filters = filters def @logger.flush # Chamando o flush diretamente, pois está demorando para descarregar a memória # além de não ter a opção de executar logdev = self.instance_variable_get(:@logdev) logdev.instance_variable_get(:@dev).flush if logdev end end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
5 6 7 |
# File 'lib/simple_rack_logger/rack_logger.rb', line 5 def logger @logger end |
Class Method Details
.flush ⇒ Object
12 13 14 15 16 17 |
# File 'lib/simple_rack_logger/rack_logger.rb', line 12 def @logger.flush # Chamando o flush diretamente, pois está demorando para descarregar a memória # além de não ter a opção de executar logdev = self.instance_variable_get(:@logdev) logdev.instance_variable_get(:@dev).flush if logdev end |