remove logging code for now

This commit is contained in:
Sam 2017-12-08 08:36:16 +11:00
parent 94d58320fc
commit 0693ed10d1
1 changed files with 11 additions and 7 deletions

View File

@ -8,13 +8,17 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
Rails.application.configure do Rails.application.configure do
config.lograge.enabled = true config.lograge.enabled = true
config.lograge.custom_payload do |controller| # Seeing RuntimeError (Missing rack.input)
username = controller.try(:current_user)&.username rescue nil # for: `/topics/timings`
{ #
ip: controller.request.remote_ip, #
username: username, # config.lograge.custom_payload do |controller|
} # username = controller.try(:current_user)&.username rescue nil
end # {
# ip: controller.request.remote_ip,
# username: username,
# }
# end
config.lograge.custom_options = lambda do |event| config.lograge.custom_options = lambda do |event|
exceptions = %w(controller action format id) exceptions = %w(controller action format id)