Class: Samuel::LogEntries::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/samuel/log_entries/base.rb

Direct Known Subclasses

HttpClient, NetHttp

Instance Method Summary collapse

Constructor Details

#initialize(http, request, response, time_requested, time_responded) ⇒ Base

Returns a new instance of Base.



4
5
6
7
# File 'lib/samuel/log_entries/base.rb', line 4

def initialize(http, request, response, time_requested, time_responded)
  @http, @request, @response = http, request, response
  @seconds = time_responded - time_requested
end

Instance Method Details

#log!Object



9
10
11
# File 'lib/samuel/log_entries/base.rb', line 9

def log!
  Samuel.logger.add(log_level, log_message)
end