class LogrageRailsRequestQueuing::ExceptionDetails

Public Class Methods

add_any_exception!(event, log_custom_options) click to toggle source

If the current request has an exception attached, add the exception details and backtrace to the logging custom options

# File lib/lograge_rails_request_queuing/exception_details.rb, line 5
def self.add_any_exception!(event, log_custom_options)
  if event.payload[:exception_object]
    log_custom_options[:exception] = event.payload[:exception]
    log_custom_options[:backtrace] = Array(event.payload[:exception_object].backtrace)
  end
  nil
end