开发者

How to configure log4j to log Spring injections

开发者 https://www.devze.com 2023-01-05 23:04 出处:网络
How can I configure log4j to write an entry to the log every time it injects a class? My use case is this: I have Autowiring 开发者_运维问答enabled. I have some interfaces with multiple implementing

How can I configure log4j to write an entry to the log every time it injects a class?

My use case is this: I have Autowiring 开发者_运维问答enabled. I have some interfaces with multiple implementing classes. I want to be able to see in the log which impl class gets injected to another class.

Any thoughts?


How can I configure log4j to write an entry to the log every time it injects a class? ... Any thoughts?

My thought is that the real problem is to get Spring or your application to generate the log events; e.g. to call the relevant methods on a Logger at the relevant point.

0

精彩评论

暂无评论...
验证码 换一张
取 消