p***p 发帖数: 559 | 1 特别头疼的是,当几个不同的软件,比如Tomcat和网站都使用log4j,但是希望设置不同
的
policy时候,不知道如何写配置文件,放在哪里。每次都是碰运气。特别是现在使用什么
commenlogfactory之后 | m******t 发帖数: 2416 | 2
You need multiple copies of log4j.property and log4j.jar.
For tomcat logging: put one log4j.jar in /common/lib,
and log4j.properties in /common/classes.
For your web app, put one log4j.jar in your WEB-INF/lib,
and log4j.properties at wherever you want, just give the path
when you configure it in the web app.
【在 p***p 的大作中提到】 : 特别头疼的是,当几个不同的软件,比如Tomcat和网站都使用log4j,但是希望设置不同 : 的 : policy时候,不知道如何写配置文件,放在哪里。每次都是碰运气。特别是现在使用什么 : commenlogfactory之后
| p***p 发帖数: 559 | 3 我总是对web app的相对路径很糊涂,都是以webapps/your app/ 为root么
不同
什么
【在 m******t 的大作中提到】 : : You need multiple copies of log4j.property and log4j.jar. : For tomcat logging: put one log4j.jar in /common/lib, : and log4j.properties in /common/classes. : For your web app, put one log4j.jar in your WEB-INF/lib, : and log4j.properties at wherever you want, just give the path : when you configure it in the web app.
| m******t 发帖数: 2416 | 4
There is "path" and "classpath". They are different. 8-)
This might be helpful for you:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
【在 p***p 的大作中提到】 : 我总是对web app的相对路径很糊涂,都是以webapps/your app/ 为root么 : : 不同 : 什么
|
|