Log backtrace on exceptions
This commit is contained in:
parent
9de3e6e74b
commit
c7b97073ee
1 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,7 @@ Rails.application.configure do
|
||||||
# injected by ansible.
|
# injected by ansible.
|
||||||
if !config.lograge.custom_options
|
if !config.lograge.custom_options
|
||||||
config.lograge.custom_options = lambda do |event|
|
config.lograge.custom_options = lambda do |event|
|
||||||
|
exception_object = event.payload[:exception_object]
|
||||||
{
|
{
|
||||||
type: 'tps',
|
type: 'tps',
|
||||||
user_id: event.payload[:user_id],
|
user_id: event.payload[:user_id],
|
||||||
|
@ -14,7 +15,8 @@ Rails.application.configure do
|
||||||
user_agent: event.payload[:user_agent],
|
user_agent: event.payload[:user_agent],
|
||||||
browser: event.payload[:browser],
|
browser: event.payload[:browser],
|
||||||
browser_version: event.payload[:browser_version],
|
browser_version: event.payload[:browser_version],
|
||||||
platform: event.payload[:platform]
|
platform: event.payload[:platform],
|
||||||
|
backtrace: exception_object ? exception_object.backtrace.join("\n") : nil
|
||||||
}.compact
|
}.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue