This is one of the dumb mistakes I've done. I spent a lot of time trying to debug this problem and tried all the responses posted above, but in the end, it was one of my many dumb mistakes.
I was using org.apache.logging.log4j.Logger
(:fml:) whereas I should have used org.apache.log4j.Logger
. Using this correct logger saved my evening.