From 02577d9c5705c5f7fbbd3d275070587218d79530 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Wed, 10 Jan 2024 14:09:34 +0530 Subject: [PATCH] Added more logs (#1084) * Added more logs * added more logs --- app/models/concerns/indexable.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index 2b3d1e078..fb93f8622 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -22,14 +22,17 @@ module Indexable end if instance_of?(DataciteDoi) || instance_of?(OtherDoi) || instance_of?(Doi) - Rails.logger.info "[Event Data Import Message] #{aasm_state} #{to_jsonapi.inspect} its a DOI" + Rails.logger.info "[Event Data Import Message] its a DOI #{aasm_state} #{to_jsonapi} " if aasm_state == "findable" changed_attributes = saved_changes - Rails.logger.info "[Event Data Import Message] #{aasm_state} #{changed_attributes.inspect} before call" + Rails.logger.info "[Event Data Import Message] changes -- #{aasm_state} -- #{changes}" + Rails.logger.info "[Event Data Import Message] saved_changes -- #{aasm_state} -- #{saved_changes}" relevant_changes = changed_attributes.keys & %w[related_identifiers creators funding_references aasm_state] + Rails.logger.info "[Event Data Import Message] before call -- #{aasm_state} -- #{relevant_changes} --- #{(created == updated)}" + Rails.logger.info "[Event Data Import Message] dates -- #{aasm_state} -- #{created} --- #{updated} " if relevant_changes.any? || (created == updated) send_import_message(to_jsonapi) - Rails.logger.info "[Event Data Import Message] #{aasm_state} #{to_jsonapi.inspect} send to Event Data service." + Rails.logger.info "[Event Data Import Message] send to Event Data service. #{aasm_state} #{to_jsonapi} " end end elsif instance_of?(Event)