tomact或者jetty启动缓慢【在加载log4j配置的时候】
在自己的电脑上面启动都正常,在别人电脑上启动一直卡在这边
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
需要加入log4j的配置文件默认会查找resources下的log4j.properties
log4j.rootLogger=INFO,A1,R #hibernate sql log4j.logger.org.hibernate.SQL=error log4j.additivity.org.hibernate.SQL=false log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.Target=System.out log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=[%c]%m%n log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=../activiti.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.Threshold=ALL log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=[%p][%d{yyyy-MM-dd HH\:mm\:ss,SSS}][%c]%m%n # Struts OgnlUtil issues unimportant warnings log4j.logger.com.opensymphony.xwork2.util.OgnlUtil=error log4j.logger.com.opensymphony.xwork2.ognl.OgnlValueStack=error
如果其他路径查找在web.xml中加入
<context-param> <param-name>log4jConfigLocation</param-name> <param-value>classpath:/log4j.properties</param-value> </context-param> <listener> <listener-class> org.springframework.web.util.Log4jConfigListener <listener-class> <listener>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。