CustomizableTraceInterceptor has a feature by which I could ask AOP to put the log message under the object being intercepted. So instead of logs appearing as
I would like the logs to appear asCode:org.springframework.aop.interceptor.CustomizableTraceInterceptor:invokeUnderTrace
This feature is not working. It's not working because inherently it seems log4j and commons log don't support creating logger for a different class. For example let's look at this class.Code:com.mycompany.web.aop.CustomInterceptor:methodName
The generated log message isCode:public class A { public void testing() { Logger log = Logger.getLogger(B.class); log.debug("### testing"); } }
Here I am using log4j and I have created logger for class 'B'. Even though the logger is created for classs 'B' the generated log has 'com.mycompany.A' instead of 'com.mycompany.B'.Code:com.mycompany.A:test:4) - ### testing
Am I missing something here?


Reply With Quote