# Only use Lograge for RailsunlessSidekiq.server?filename=File.join(Rails.root,'log',"#{Rails.env}_json.log")Rails.application.configuredoconfig.lograge.enabled=true# Store the lograge JSON files in a separate fileconfig.lograge.keep_original_rails_log=true# Don't use the Logstash formatter since this requires logstash-event, an# unmaintained gem that monkey patches `Time`config.lograge.formatter=Lograge::Formatters::Json.newconfig.lograge.logger=ActiveSupport::Logger.new(filename)# Add request parameters to log outputconfig.lograge.custom_options=lambdado|event|{time: event.time,params: event.payload[:params].except(%w(controller action format))}endendend