-
Notifications
You must be signed in to change notification settings - Fork 114
/
bootlog4j.conf
56 lines (47 loc) · 2.15 KB
/
bootlog4j.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
log4j.rootLogger=INFO,stdout,info,warn,error
log4j.logger.info=info
log4j.logger.warn=warn
log4j.logger.error=error
log4j.logger.org.springframework=warn
log4j.logger.org.apache=info,error
log4j.logger.org.aspectj.weaver=warn
log4j.logger.org.hibernate=off
log4j.logger.com.mchange=off
log4j.logger.java.sql.Connection=info
log4j.logger.java.sql.Statement=info
log4j.logger.java.sql.ResultSet=info
log4j.logger.java.sql.PreparedStatement=info
#log4j.logger.httpclient.wire.header=off
#log4j.logger.httpclient.wire.content=off
#log4j.logger.org.apache.commons.httpclient=off
#log4j.logger.org.apache.commons.httpclient.Wire=off
################打印到控制台
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{yyyy-MM-dd HH\:mm\:ss\:SSS}\:%l - \n%p\: %m%n
################记录系统日志,监控客户端运行情况
log4j.appender.info=org.apache.log4j.DailyRollingFileAppender
log4j.appender.info.File=bootlog/INFO.log
log4j.appender.info.layout=org.apache.log4j.PatternLayout
log4j.appender.info.Threshold = INFO
log4j.appender.info.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss:SSS}:%p %l - %m%n
log4j.appender.info.DatePattern = '.'yyyy-MM-dd
log4j.appender.info.encoding=UTF-8
################
################记录系统告警日志
log4j.appender.warn=org.apache.log4j.DailyRollingFileAppender
log4j.appender.warn.File=bootlog/WARN.log
log4j.appender.warn.layout=org.apache.log4j.PatternLayout
log4j.appender.warn.Threshold = WARN
log4j.appender.warn.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss:SSS}:%p %l - %m%n
log4j.appender.warn.DatePattern = '.'yyyy-MM-dd
log4j.appender.warn.encoding=UTF-8
################
################记录系统错误,监控程序是否出错
log4j.appender.error=org.apache.log4j.DailyRollingFileAppender
log4j.appender.error.File=bootlog/ERROR.log
log4j.appender.error.layout=org.apache.log4j.PatternLayout
log4j.appender.error.Threshold = ERROR
log4j.appender.error.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss:SSS}:%p %l - %m%n
log4j.appender.error.DatePattern = '.'yyyy-MM-dd
log4j.appender.error.encoding=UTF-8