lib/logstasher/action_view/log_subscriber.rb in logstasher-2.1.1 vs lib/logstasher/action_view/log_subscriber.rb in logstasher-2.1.2
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'active_support/notifications'
require 'action_view/log_subscriber'
require 'logstasher/custom_fields'
module LogStasher
@@ -29,10 +31,10 @@
data.merge! LogStasher.store
data.merge! extract_custom_fields(data)
tags = []
tags.push('exception') if data[:exception]
- logger << LogStasher.build_logstash_event(data, tags).to_json + "\n"
+ logger << "#{LogStasher.build_logstash_event(data, tags).to_json}\n"
end
def extract_data(data)
{ identifier: from_rails_root(data[:identifier]) }
end