Class: LlamaAlarm::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- LlamaAlarm::LogSubscriber
- Defined in:
- lib/llama_alarm.rb
Instance Method Summary collapse
Instance Method Details
#sql(event) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/llama_alarm.rb', line 24 def sql(event) exception = event.payload[:exception] if exception exception_object = event.payload[:exception_object] error "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \ "(#{exception_object.backtrace.first})" puts error else # standard logger code end end |