In our understanding of the word, there is no logic in 1984. The party states that the external world does not exist; that "reality" exists only in the mind. Our concepts of logic are generally based on the belief in the existence of an outside world that is consistent and allows us to be "logical." If you can manipulate "reality," the manipulation of "logic" is nothing.
So at the end, when Winston is made to believe that 2 + 2 really does equal 5, and this is not something that he just says, he actually believes it, he is consenting to the notion that the logic of math does not exist and that reality can be manipulated to suit specific needs, in this case the needs of the party.
We see the same thing in the Party's manipulation of history. Something that we tend to think is real, even though most of us know practically nothing about it and can be made to believe anything we are told, is subject to manipulation. The Party's "truth" is substituted for he "logic" of history, and after a while, who knows. It is reminiscent of Our Ford's "History is bunk" in Brave New World. It's bunk because we never know if it's true, and perhaps never can know.
In "1984" the concept of logic is manipulated and corrupted through the use of pain, torture, and fear. "The Party cannot allow people to have a perception of reality that is different from theirs." A very good example of this is when Winston is strapped down to the table and O'Brien is trying to make Winston tell him how many fingers he has up. O'Brien is holding up 4 fingers, but wants Winston to see 5. Every time Winston answers 4 he is shocked and pain is sent through his body. When Winston says he sees 5 fingers O'Brien shocks him because he says, "you don't really believe you see 5 you are just saying that to avoid the pain." O'Brien wants Winston to really see 5 fingers. Another example is when O'Brien is trying to get Winston to acknowledge that there was never life before man. O'Brien tells Winston that before the cognitive ability of man nothing existed. O'Brien is tortured until he can not just agree with this philosophy but believe it.
It is only through hate, fear, intimidation, and pain that
"the party" can control the logic of the population. It is very effective and "everyone eventually give in. The torture continues by Party members whose aim is to humiliate and belittle him through the use of constant traps and contradictions. This torture is supposed to destroy his power of reasoning."