Who invented logic, God or Satan?
It was most likely invented by humankind. Arose during the development of language, starting, maybe, about 12,000 years ago, and refined ever since then. By humans.
Ideas about gods and demons have many illogical components.
God just appeared out of nothing, and created Satan, who in turn created logic.
Oh never mind, that is the Big Bang theory.
Well now. The word 'invented' implies that logic is bounded by the dimension of time and that there was some length of dimension 't' that logic did not exist.
Since God is not bound by time but is eternal, then (by your own statement of terms) logic cannot have been 'invented' by God because that would mean that there was some time (t) when God was not logical but somehow stumbled onto the concept of 'logic', recognized that it was something that did not exist but was needed and decided to 'invent' it (presumably through 'illogical' thought since that is all that could have existed at that time). This does not seem to be possible since recognizing a missing need and deciding to create it is itself a 'logical' process.
OTOH, your question may be an example of the inadequacy of human reasoning, in which case it only serves to illustrate man's ability to conflate mutually exclusive ideas into a single irrational question with no real answer.
It isn't even a real question.
Well, you think about it, anyway.