I think you should use the Rails debug options:
logger.debug "Person attributes hash: #{@person.attributes.inspect}"
logger.info "Processing the request..."
logger.fatal "Terminating application, raised unrecoverable error!!!"
https://guides.rubyonrails.org/debugging_rails_applications.html