Skip to content

Commit

Permalink
add logging for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
wendelfabianchinsamy committed Jan 14, 2025
1 parent a38927b commit 693c22e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/models/related_identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ def self.push_item(item)
doi = attributes.fetch("doi", nil)
Rails.logger.info("Related Identifier: doi -> #{doi.inspect}")

Rails.logger.info("[Related Identifier: cached_doi_ra #{cached_doi_ra(doi)}]")
begin
cdr = cached_doi_ra(doi)
Rails.logger.info("[Related Identifier: cached_doi_ra #{cdr}]")
rescue => err
Rails.logger.info(err.inspect)
Rails.logger.error(err)
end

return nil unless doi.present? && cached_doi_ra(doi) == "DataCite"

Expand Down

0 comments on commit 693c22e

Please sign in to comment.