lib/logstasher/log_subscriber.rb in logstasher-0.6.0 vs lib/logstasher/log_subscriber.rb in logstasher-0.6.1

- old
+ new

@@ -107,21 +107,22 @@ def process(event) process_event(event, ['mailer', 'process']) end + def logger + LogStasher.logger + end + private + def process_event(event, tags) data = LogStasher.request_context.merge(extract_metadata(event.payload)) event = LogStash::Event.new('@source' => LogStasher.source, '@fields' => data, '@tags' => tags) logger << event.to_json + "\n" end def extract_metadata(payload) payload.slice(*MAILER_FIELDS) - end - - def logger - LogStasher.logger end end end