Class: SilverMother::Utils
- Inherits:
-
Object
- Object
- SilverMother::Utils
- Includes:
- Singleton
- Defined in:
- lib/silver_mother/utils.rb
Instance Method Summary collapse
Instance Method Details
#log_request(path, params, result) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/silver_mother/utils.rb', line 12 def log_request(path, params, result) = <<-LOG_MESSAGE \n SENSE PATH: #{SENSE_API_URL}#{path} SENSE PARAMS: #{params.inspect} SENSE RESPONSE: #{result.success? && result.parsed_response.inspect} LOG_MESSAGE logger.debug() unless ENV['RACK_ENV'] == 'test' end |
#logger ⇒ Object
8 9 10 |
# File 'lib/silver_mother/utils.rb', line 8 def logger @logger ||= (defined?(Rails) ? Rails.logger : ::Logger.new(STDOUT)) end |