Module: AppmospheresAudit::SupportTrail

Defined in:
lib/appmospheres_audit.rb

Instance Method Summary collapse

Instance Method Details

#log_exception(ex) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/appmospheres_audit.rb', line 33

def log_exception(ex)
  begin
    EventLog.create!(:event_type => ex.class.to_s, :action => "exception", :payload => ex.backtrace.to_yaml)
  rescue
    Rails.logger.warn "Could not log event 'exception' for #{ex.class.to_s}:#{ex.backtrace.inspect}" rescue nil
  end
end