Module: Makara::Logging::Subscriber

Defined in:
lib/makara/logging/subscriber.rb

Constant Summary collapse

IGNORE_PAYLOAD_NAMES =
["SCHEMA", "EXPLAIN"]

Instance Method Summary collapse

Instance Method Details

#sql(event) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/makara/logging/subscriber.rb', line 7

def sql(event)
  name = event.payload[:name]
  unless IGNORE_PAYLOAD_NAMES.include?(name)
    name = [current_wrapper_name(event), name].compact.join(' ')
    event.payload[:name] = name
  end
  super(event)
end