Class: LogStasher::ActiveRecord::LogSubscriber

Inherits:
ActiveRecord::LogSubscriber
  • Object
show all
Includes:
CustomFields::LogSubscriber
Defined in:
lib/logstasher/active_record/log_subscriber.rb

Instance Method Summary collapse

Methods included from CustomFields::LogSubscriber

#extract_custom_fields

Instance Method Details

#identity(event) ⇒ Object Also known as: sql



12
13
14
15
# File 'lib/logstasher/active_record/log_subscriber.rb', line 12

def identity(event)
  lsevent = logstash_event(event)
  logger << "#{lsevent.to_json}\n" if logger && lsevent
end

#loggerObject



18
19
20
# File 'lib/logstasher/active_record/log_subscriber.rb', line 18

def logger
  LogStasher.logger
end