What are the available options to retrieve Spring-managed beans in a Log4J Appender inside a Spring-managed web application?

前端 未结 2 2014
暗喜
暗喜 2021-01-20 08:35

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

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-20 09:13

    Bit late, but I hope that this can help someone else. I've documented a solution to this issue in the answer i've provided in the following link:

    log4j - Accessing spring bean from logging appender class

提交回复
热议问题