Class: MemoryTracker::Stores::UrlLogfileStore
- Defined in:
- lib/memory_tracker/stores/url_logfile_store.rb
Instance Method Summary collapse
-
#initialize(opts) ⇒ UrlLogfileStore
constructor
A new instance of UrlLogfileStore.
- #push(request) ⇒ Object
- #stats ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(opts) ⇒ UrlLogfileStore
Returns a new instance of UrlLogfileStore.
6 7 8 9 10 11 |
# File 'lib/memory_tracker/stores/url_logfile_store.rb', line 6 def initialize(opts) logger_class = opts.fetch(:logger_class, 'Logger') filename = opts.fetch(:filename, "#{Rails.root}/log/memtracker_urls.log") @logger = logger_class.constantize.new(filename) end |
Instance Method Details
#push(request) ⇒ Object
13 14 15 16 |
# File 'lib/memory_tracker/stores/url_logfile_store.rb', line 13 def push(request) @request = request write_request_log end |
#stats ⇒ Object
18 19 |
# File 'lib/memory_tracker/stores/url_logfile_store.rb', line 18 def stats end |