Configuring Jetty Logging using log4j.properties
Step 1: Put your log4j.properties on $jetty.home/resources
Step 2: The logging jars should be made available on jetty's classpath. Refer below:
Via log4j:
On your $jetty.home/lib/ext, add the ff jars:
- slf4j-api-1.3.1.jar
- log4j-1.2.14.jar
- slf4j-log4j12-1.3.1.jar
via commons-logging:
On your $jetty.home/lib/ext, add the ff jars:
- slf4j-api-1.3.1.jar
- commons-logging-1.1.jar
- slf4j-jcl-1.3.1.jar
- log4j-1.2.14.jar
本文介绍如何使用log4j.properties文件来配置Jetty服务器的日志记录。主要步骤包括将log4j.properties文件放置于$jetty.home/resources目录下,并确保必要的日志处理jar包位于Jetty的扩展库路径中。
1751

被折叠的 条评论
为什么被折叠?



