我们使用RAD 7.5作为IDE,也使用log4j进行日志记录.我们想要启用spring logging.
我尝试了以下内容
org.springframework.web.util.Log4jConfigListener作为听众添加web.xml.之前添加了它ContextLoaderListener.log4j.properties在申请战中出现WEB-INF.web.xml:<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</context-param>
Run Code Online (Sandbox Code Playgroud)
在log 4j中添加了以下内容
log4j.logger.org.springframework=ALL
Run Code Online (Sandbox Code Playgroud)
即使这样,我也无法在控制台或日志文件中看到任何输出.
任何人都可以让我知道启用弹簧记录的确切步骤.