Make new module responsible for logging.
Use programmatically configuration for log4j in separe module.