Since log4j version 1.2.12 ConsoleAppender always logs to System.out or System.err but not to the stream that was given to ConsoleAppender at the beginning of it's life cycle (normally stdout or stderr). To log errors that occur in third party libraries, we redirect all output to System.out and System.err to a stream that uses log4j as output. If ConsoleAppender is configured as a appender, this will result in stack overflows or out-of-memory-errors. See bug 31056, which was probably erroneously considered as a bug.
In quickly forthcoming 1.2.13, ConsoleAppender's original behavior will be restored as default, but there will be a new attribute "follow" that will allow a user to cause ConsoleAppender to log to the current value of System.out or System.err. *** This bug has been marked as a duplicate of 37122 ***