Module: Qu::Logger
- Included in:
- Backend::Base, Payload, Worker
- Defined in:
- lib/qu/logger.rb
Instance Method Summary collapse
Instance Method Details
#clean_backtrace(exception) ⇒ Object
13 14 15 16 17 |
# File 'lib/qu/logger.rb', line 13 def clean_backtrace(exception) defined?(Rails) && Rails.respond_to?(:backtrace_cleaner) ? Rails.backtrace_cleaner.clean(exception.backtrace) : exception.backtrace end |
#log_exception(exception) ⇒ Object
7 8 9 10 11 |
# File 'lib/qu/logger.rb', line 7 def log_exception(exception) = "\n#{exception.class} (#{exception.}):\n " << clean_backtrace(exception).join("\n ") << "\n\n" logger.fatal() end |