##*********************自定义log4j配置*******************************##
### copy by MSY ###
### 设置根Logger级别INFO ,输出地MSY,MSY2 ##
log4j.rootLogger=DEBUG,MSY,MSY2
设置com.hcinfo.velocity域对应的级别INFO,DEBUG,WARN,ERROR和输出地MSY,MSY2
log4j.category.com.hcinfo.velocity=DEBUG
### 定义stdout的输出到控制断 ###
#log4j.appender.MSY=org.apache.log4j.ConsoleAppender
#log4j.appender.MSY.Target=System.out
### 定义stdout布局模式为PatternLayout ###
#log4j.appender.MSY.layout=org.apache.log4j.PatternLayout
### 定义stdout的输出格式 ###
#log4j.appender.MSY.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
### 定义MSY输出到文件(文件大小到达指定尺寸的时候产生一个新的文件) ###
log4j.appender.MSY2=org.apache.log4j.RollingFileAppender
### 文件位置 ###
log4j.appender.MSY2.File=e:/sys2.txt
### 文件最大长度 ###
log4j.appender.MSY2.MaxFileSize=500KB
### 备份文件数目 ###
log4j.appender.MSY2.MaxBackupIndex=1
log4j.appender.MSY2.layout=org.apache.log4j.PatternLayout
log4j.appender.MSY2.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c] [%p] - %m%n
### 配置日志输出的格式##
### 格式说明
# -X号:X信息输出时左对齐;
# %p:日志信息级别
# %d{}:日志信息产生时间
# %c:日志信息所在地(类名)
# %m:产生的日志具体信息
# %n:输出日志信息换行
### 下面是定义 hibernate LOG4J 配置格式 ###
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
### direct messages to file hibernate.log ###
#log4j.appender.file=org.apache.log4j.FileAppender
#log4j.appender.file.File=hibernate.log
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
### set log levels - for more verbose logging change 'info' to 'debug' ###
### 在次可定义输出输出端stdout ###
log4j.rootLogger=warn, stdout
log4j.logger.net.sf.hibernate=info
### log just the SQL
#log4j.logger.net.sf.hibernate.SQL=debug
### log JDBC bind parameters ###
log4j.logger.net.sf.hibernate.type=info
### log schema export/update ###
log4j.logger.net.sf.hibernate.tool.hbm2ddl=debug
### log cache activity ###
#log4j.logger.net.sf.hibernate.cache=debug
### log jdbc resource acquisition
#log4j.logger.net.sf.hibernate.impl.BatcherImpl=debug
### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
#log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=trace
## 定义 log4j 的 spring 配置 ##
log4j.rootLogger=DEBUG,Spring
log4j.appender.Spring=org.apache.log4j.ConsoleAppender
log4j.appender.Spring.Target=System.out
log4j.appender.Spring.layout=org.apache.log4j.PatternLayout
log4j.appender.Spring.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
####