[SP-631] Don't close console and file log4j appenders prematurely if we are running embedded