Class: LogStasher::ActiveRecord::LogSubscriber
- Inherits:
-
ActiveRecord::LogSubscriber
- Object
- ActiveRecord::LogSubscriber
- LogStasher::ActiveRecord::LogSubscriber
- Includes:
- CustomFields::LogSubscriber
- Defined in:
- lib/logstasher/active_record/log_subscriber.rb
Instance Method Summary collapse
- #identity(event) ⇒ Object (also: #sql)
- #logger ⇒ Object
Methods included from CustomFields::LogSubscriber
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 |
#logger ⇒ Object
18 19 20 |
# File 'lib/logstasher/active_record/log_subscriber.rb', line 18 def logger LogStasher.logger end |