Fix issues with params nesting in logs

pull/15934/head
Alberto Miedes Garcés 4 years ago
parent d9f8e28da2
commit 96d1a7da20

@ -44,10 +44,4 @@ class BaseCommand
{ command_class: self.class.name, request_id: request_id }
end
# Can be overriden in specific commands in order to make debugging easier.
# Shouldn't contain any sensitive information
def loggable_params
{}
end
end

@ -16,8 +16,8 @@ module OrganizationCommands
notifications_topic.publish(:organization_created, organization.attributes.slice('id', 'name'))
end
def loggable_params
{ organization_name: params[:organization][:name] }
def log_context
super.merge(organization_name: params.dig(:organization, :name))
end
end

@ -17,8 +17,8 @@ module OrganizationCommands
notifications_topic.publish(:organization_deleted, id: params[:id])
end
def loggable_params
{ organization_id: params[:id] }
def log_context
super.merge(organization_id: params[:id])
end
end

@ -9,8 +9,8 @@ module OrganizationCommands
organization.save!
end
def loggable_params
{ organization_id: params[:id] }
def log_context
super.merge(organization_id: params[:id])
end
end

Loading…
Cancel
Save