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.
101 102 103 104 |
# File 'lib/racknga/middleware/log.rb', line 101 def initialize(database) @database = database @entries = @database.entries end |
Instance Method Details
#log(tag, path, options = {}) ⇒ Object
106 107 108 109 110 |
# File 'lib/racknga/middleware/log.rb', line 106 def log(tag, path, ={}) @entries.add(.merge(:time_stamp => Time.now, :tag => tag, :path => path)) end |