Move structured logging to the engine

This commit is contained in:
Jorge Manrubia
2025-11-27 07:24:41 +01:00
parent 5bdb19bdaf
commit 120ae3b9b6
+5 -1
View File
@@ -35,9 +35,13 @@ module Fizzy
end
end
initializer "fizzy_saas.logging.queenbee_id" do |app|
initializer "fizzy_saas.logging.session" do |app|
ActiveSupport.on_load(:action_controller_base) do
before_action do
if Current.identity.present?
logger.struct(" Authorized Identity##{Current.identity.id}", authentication: { identity: { id: Current.identity.id } })
end
if Current.account.present?
logger.struct(account: { queenbee_id: Current.account.external_account_id })
end