Skip to content

Instantly share code, notes, and snippets.

@wulab
Created June 30, 2017 05:05
Show Gist options
  • Select an option

  • Save wulab/13f6a83dfae30672e69b7345fc83a95b to your computer and use it in GitHub Desktop.

Select an option

Save wulab/13f6a83dfae30672e69b7345fc83a95b to your computer and use it in GitHub Desktop.
config.log_level = :info
config.log_tags = [:remote_ip]
if defined?(Rails::Console)
config.logger = Logger.new('/dev/null')
config.after_initialize { ActiveRecord::Base.logger.level = 0 }
else
config.log_formatter = Logger::Formatter.new
config.lograge.enabled = true
config.lograge.custom_options = lambda do |event|
{ params: event.payload[:params].except('controller', 'action', 'format', 'status') } if event.payload[:exception]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment