In the applicationContext.xml
<bean id="timingLogger" class="org.springframework.aop.interceptor.PerformanceMonitorInterceptor">
<aop:aspectj-autoproxy>
<aop:config>
<aop:advisor pointcut="execution(* com.yourcompany.application.dao.*.*(..))" ref="timingLogger">
</aop:advisor>
</aop:config>
</aop:aspectj-autoproxy>
and then in log4j.properties
log4j.logger.org.springframework.aop.interceptor.PerformanceMonitorInterceptor=TRACE, stdouttrace
log4j.appender.stdouttrace=org.apache.log4j.ConsoleAppender
log4j.appender.stdouttrace.layout=org.apache.log4j.PatternLayout
log4j.appender.stdouttrace.layout.ConversionPattern=%m%n
We found the problem was not in the application, but with the dev server, which was not configured properly to resolve hosts...
No comments:
Post a Comment