This seems like a useful opportunity to suggest a technical but valuable distinction between different applications of logic.
While it's a bit of a broad brush, logic might be held as the study of the relationships between statements. Classes and sets of statements are related to each other in many different ways; for example, we might understand how the statement
"The sky is blue" is in some way connected to the statement
"The sky is blue and grass is green" by building up accounts of the grammar, syntax and meaning of how
'and' works in statements.
One particular kind of relationship which logicians are interested in is the relationship of entailment. If we say that one statement
A entails another statement
B, then we are saying that there is a particular kind of connection that suggests the second statement
B is in some sense not any more informative than the original statement
A; it "follows from" it, if
A is true then
B is also true,
B is a 'consequence' of
A, etc. Using our above example, we might say that the statement
"the sky is blue and grass is green" entails the statement
"the sky is blue".
A practical way in which logicians' models of entailment comes into use is in the consideration of Arguments. "Argument" is a little more informal than entailment, in that it is roughly supposed to capture the intuition of what one ought to accept given one's prior agreed assertions, but the two concepts are related in at least the way that one delineates boundaries for the other. At the very least, we might say, one ought to accept the logically entailed consequences of the premises of an argument.
What these concepts have in common is a kind of relational structure, where we on the one hand have something like premises or antecedents, and on the other conclusions or consequents. Validity, in logic, is used to talk about specifically this kind of relational structure. You can talk about an argument, an implication, an entailment, as valid or invalid. But not all groups of statements have this kind of antecedent-consequent structure. Why might we say the unordered set of statements
A, B, C, D should be valid or invalid? It would be reasonable to do so would be to say if we were applying some sort of "if then" relationship to the statements in some order; like, "
D follows from
A,B and C", but not all collections of statements are intended to be so organized as entailments, or even as arguments.
"It's a nice day today." "Dave says Hi."
However, there are some kinds of properties that we could, potentially, apply indiscriminately to any arbitrary collection of statements. For example, Truth, as a property of individual statements, intuitively generalises to sets or collections of sentences. A set of sentences is true if and only if every sentence in it is True (or, equivalently, the sentence formed by taking all the sentences in it and combining them using 'And's is true).
Another even more interesting one is Consistency. Consistency is a little more intricate, but if you understand entailment already, then you can understand consistency in terms of it: the set of sentences does not entail any statement of the form
P and not P. These statements are Contradictions; they suggest that there is some information in the set of statements that negates other information contained in that same set. True sets of statements are of course consistent, but not every consistent set of statements is necessarily true! It would be internally consistent to assert that "the sky is red" and "ripe tomatoes and the sky are the same colour", even if both statements are in fact false.
To complicate matters further, not every use of written words necessarily constitutes a statement. Can you think of any cases where words aren't used to say things, but rather as actions of other sorts? Give it a go!
So, can logic do work on a holy book? Well, in some sense, of course it can! A book is a collection of written words, and you can decompose this collection into sets of statements, speech acts, inferences, translations and so on. However, not all concepts in logic apply to all ways you might group statements together. It only makes sense to think of a collection of statements as "valid" in the context of some sort of entailment/argumentative structure. Not everything written in the book is there to pose an argument, or even to create a series of assertions about the world, and so any rigorous analysis of the logical content of a holy text would need to take account of the differing linguistic actions being carried out with each written word.
An attempt to chart the inconsistencies of any given holy text would be a fascinating endeavour. You'd have to process a huge amount of information in order to do it, but in doing so you would be building a phenomenal way to interrogate the text as a whole.