class Log4jOverridableConfigurer implements BeanPostProcessor, PriorityOrdered, ApplicationContextAware {

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException
    {
        // Perform our initialization one time even though this method will be called once for each bean being initialized.
        // The bean properties will have already been set by the time this method is called which is required for our initialization.
        if (!loggingInitialized)
        {
            initLogging();
            loggingInitialized = true;
        }

        // Perform the standard processing by returning the original bean.
        return bean;
    }

}