lib/europeana/logging/engine.rb in europeana-logging-0.1.0 vs lib/europeana/logging/engine.rb in europeana-logging-0.1.1
- old
+ new
@@ -22,10 +22,11 @@
app.config.lograge.formatter = Lograge::Formatters::Logstash.new
end
# Configure Logstash
initializer 'europeana_logging.configure_logstash' do |app|
- app.config.logger = Rails.logger = LogStashLogger.new(type: :stdout)
+ stdout_logger = LogStashLogger.new(type: :stdout)
+ app.config.logger = Rails.logger = ActionController::Base.logger = stdout_logger
LogStashLogger.configure do |config|
config.customize_event do |event|
event['level'] = event.remove('severity')
event['thread'] = Thread.current.object_id.to_s
end