Class: ExceptionTrack::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- ExceptionTrack::LogSubscriber
- Defined in:
- lib/exception-track/log_subscriber.rb
Instance Method Summary collapse
-
#track(event) ⇒ Object
ActiveSupport::Notifications.instrument(‘track.exception_track’, action: action).
Instance Method Details
#track(event) ⇒ Object
ActiveSupport::Notifications.instrument(‘track.exception_track’, action: action)
6 7 8 9 10 |
# File 'lib/exception-track/log_subscriber.rb', line 6 def track(event) prefix = color("ExceptionTrack", CYAN) title = color(event.payload[:title], RED) debug " #{prefix} track db (#{event.duration.round(1)}ms)" end |