Class: Railstash::ControllerLogSubscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/railstash/subscribers.rb

Instance Method Summary collapse

Instance Method Details

#process_action(event) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/railstash/subscribers.rb', line 5

def process_action(event)
  payload = event.payload
  data = {
    tags: ['request'],
    status: payload[:status]
  }
  data.merge!(payload[:railstash])
  data.merge!(runtimes(event))

  Railstash.log(data)
end