Class: Racknga::Middleware::Log::Logger
- Inherits:
-
Object
- Object
- Racknga::Middleware::Log::Logger
- Defined in:
- lib/racknga/middleware/log.rb
Instance Method Summary collapse
-
#initialize(database) ⇒ Logger
constructor
A new instance of Logger.
- #log(tag, path, options = {}) ⇒ Object
Constructor Details
#initialize(database) ⇒ Logger
Returns a new instance of Logger.
96 97 98 99 |
# File 'lib/racknga/middleware/log.rb', line 96 def initialize(database) @database = database @entries = @database.entries end |
Instance Method Details
#log(tag, path, options = {}) ⇒ Object
101 102 103 104 105 |
# File 'lib/racknga/middleware/log.rb', line 101 def log(tag, path, ={}) @entries.add(.merge(:time_stamp => Time.now, :tag => tag, :path => path)) end |