As a believer in divine revelation (I am a Christian) and a professional practitioner of logic (I have been a competitive debate coach for many years) hopefully I can offer some perspective on the relation of logic to religion. In a way you may consider this essay a "critique of pure logic".
(1) Logic is ultimately content neutral.
Three forms of reasoning typically are considered 'logical': deductive reasoning (internal consistency), inductive reasoning (determining probability), and abductive reasoning (rough heuristics for understanding). Each of these systems of logic has their own strengths, but if you are searching for truth, or certainty, none of them provide a source of absolute truth on which to base your life.
(a) Deductive reasoning works from broad and known (certain) assumptions and from those derives whatever else may be known. However, it is content neutral in that you must always begin with potentially unverified'assumptions' being considered absolutely true. In religion, the content of revelation often serves as the source of content which is assumed to be true and from which other truths (i.e. laws and other applications) may be logically derived.
(b) Inductive reasoning works from specific observations and from those suggests the most probable explanation. The scientific method is an inductive process. However, when it comes to absolute truth it is content neutral in that it never offers the promise of certainty. A conclusion based on three examples may be overturned by a fourth example, and it seems to objectively accept content from observations but that means it's claim to 'truth' is only as good as the (always finite) sample size). Furthermore, (i) it doesn't ever logically propose to provide absolute truths (i.e. never claims to describe reality as it is), (ii) inherently biases sensory data at the expense of other potential sources of information, and (iii) ignores psychological data that suggests that all observations are biased by our perspective and experience - content not derived from inductive observation.
(c) Abductive reasoning looks not at specific data but rather broad sets and from that set tries to propose rough systems for interpreting that set. However, it is content neutral in that it is not really looking for absolute truth but only a system that works pragmatically. Abductive reasoning, like inductive reasoning, must ultimately depend on limited observations, and since it leans more heavily into the assumptions of the observer, doesn't usually require that the conclusions be true in every instance. This is the way imperfect humans live their lives, but not a path to truth.
Therefore, logic is useful for analyzing the world, but can never produce true content.
(2) We all exist in-the-world.
Thankfully we all have content on which the tools of logic can be turned. We grow up breathing before we speak, and speaking before we think, and believing before we can prove. Religions that depend on revelation take the content which they believe is delivered to them by God to be the source of absolute assumptions from which they may reason deductively, to guide their inductive observations, and to scaffold their ways of understanding the world at large.
(3) The proper use of logic is analytical not productive.
Therefore, logic may be useful for analyzing and critiquing our own knowledge but it can never produce knowledge, and so never properly undermines revelation for believers in revelation. To allow logic to trump religion if you are a believer is an inappropriate application of logic.