What are the available options to retrieve Spring-managed beans in a Log4J Appender inside a Spring-managed web application?
My current build lead has a great idea in theory - construct a custom Log4J appender that takes in Spring-managed beans and uses them to log errors to various other sources than just the standard log file. However, other than creating a singleton initialized at startup with the application context (code in just a moment), I can't seem to think of any other options of retrieving a Spring managed bean in a Log4J appender. public class SpringSingleton implements ApplicationContextAware { private static ApplicationContext context; public SpringSingleton() { super(); } public static