SSH Log4j配置
SSH Log4j配置 ==置web.xml== <!-- log4j监听 --> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <!-- log4j --> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/conf/log4j.properties</param-value> </context-param> ==添加jar包== log4j-1.2.15.jar spring-web.jar ==配置log4j.properties== #Config log4j.debug=true log4j.rootLogger=INFO,ERROR,CONSOLE,FILE log4j.logger.org.springframework=error log4j.logger.com.zte=debug #Console appender log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=info log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %-5p %t %m (%F:%L)%n #File appender log4j.appender.FILE=org.apache.log4j.RollingFileAppender log4j.appender.FILE.MaxFileSize=10MB log4j.appender.FILE.MaxBackupIndex=10 log4j.appender.FILE.File=${catalina.base}/logs/ace_log.log log4j.appender.FILE.Append=true log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=[%d{yyyy-MM-dd HH\:mm\:ss}] %-5p %t %m (%F\:%L)%n ==应用== private static final Log log = LogFactory.getLog(UserAction.class);
相关推荐
chw0 2020-11-04
大唐帝国前营 2020-08-18
sdaq 2020-07-26
MrLiar 2020-07-07
sdaq 2020-06-16
CXC0 2020-06-14
丨Fanny丨Cri 2020-06-13
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