tomcat 启动报错,日志不全如何检查
有的时候由于某个配置错误,导致tomcat启动失败,但是呢日志中又看不出来什么情况,折腾半天,可能发现是一个空格引起的血案
解决方法:
在classes目录下面新建log4j.properties,内容如下:
log4j.rootLogger=info,Console,R log4j.appender.Console=org.apache.log4j.ConsoleAppender log4j.appender.Console.layout=org.apache.log4j.PatternLayout #log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.appender.Console.layout.ConversionPattern=%d{yy-MM-dd HH:mm:ss} %5p %c{1}:%L - %m%n log4j.appender.R=org.apache.log4j.DailyRollingFileAppender log4j.appender.R.File=${catalina.home}/logs/tomcat.log log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d{yyyy.MM.dd HH:mm:ss} %5p %c{1}(%L):? %m%n log4j.logger.org.apache=info, R log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R log4j.logger.org.apache.catalina.core=info, R log4j.logger.org.apache.catalina.session=info, R
相关推荐
大唐帝国前营 2020-08-18
MrLiar 2020-07-07
丨Fanny丨Cri 2020-06-13
chw0 2020-11-04
sdaq 2020-07-26
sdaq 2020-06-16
CXC0 2020-06-14
CXC0 2020-06-08
dongxurr 2020-06-07
sdaq 2020-06-06
MrLiar 2020-06-04
丨Fanny丨Cri 2020-06-03
MrLiar 2020-05-25
丨Fanny丨Cri 2020-05-17
MrLiar 2020-05-14
MrLiar 2020-05-12
sdaq 2020-05-11