disable log4j during testing when exception is expected.