mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Include request.remote_ip
and current_username
in lograge logs.
This commit is contained in:
parent
ef0f6f5b97
commit
dc858ec120
@ -8,6 +8,13 @@ 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|
|
||||||
|
{
|
||||||
|
ip: controller.request.remote_ip,
|
||||||
|
current_username: controller.current_user&.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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user