We are not to ask such a question as that: “How doth God know? and is there knowledge in the most High?” (Psa. 73. 11). Indeed, whenever you indulge yourselves in secret sins which you would not have the world to see, the language of your heart is, How does God know? But, He that made the eyes, shall He not see? He that gives man knowledge, shall He not know? Yea, His understanding is infinite. The Lord is the God of knowledge, and by Him actions are weighed. He searcheth Jerusalem as with a lighted candle. Do not question His omnisciency, for as He sees in secret to reward openly them that fear Him, so He sees in secret to punish openly them that fear Him not.
Ralph Erskine