Posted on 2007-03-05 21:28
馬達+斯加 閱讀(411)
評論(2) 編輯 收藏 所屬分類:
Websphere Portal
最近玩WPS5,在應用中配置了Log4j,但是Log4j起不了作用,郁悶不已。試了好多方法,終于修得正果,以下方法在WPS5 test envoirnment 中測試通過。
1.下載最新的apache commons logging,并在jar包的根放入commons-logging.properties,內容為:org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
如果沒有commons-logging.properties,Log4j不會工作。
2.將修改后的commons-logging.jar替換掉Websphere的lib中的commons-logging.jar,注意是Appserver的lib,而不是Protal的。
3.將Log4j.jar和Log4j.properties放入commons-logging.jar所在目錄,搞定。