在目录:/opt/IBM/WebSphere/AppServer/lib下增加commons-logging-1.1.jar和log4j-1.2.13.jar;在目录:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties下增加一个文件,名为:commons-logging.properties,内容为:
priority=1
#for commons-logging-1.1.x
orgorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
#for commons-logging-1.0.x
#orgorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
如果以上步骤无效,在在应用部署后,在应用所在的EAR目录的 META-INF/services 中加个文件 org.apache.commons.logging.LogFactory ,
内容为: org.apache.commons.logging.impl.LogFactoryImpl
本文指导如何在WebSphere AppServer环境下增加并配置commons-logging和log4j的日志系统,包括添加jar包、配置文件及特殊部署后设置。
188

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



