Layout not working for log4j appender

Setting the layout in log4j appender does nothing, as it is retrieved from the parent class