log4j.properties配置文件

Posted 菊次郎的幻想

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了log4j.properties配置文件相关的知识,希望对你有一定的参考价值。

  

log4j.appender.file.encoding=UTF-8

### 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=${catalina.home}/logs/jx56.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‘ ###

log4j.rootLogger=info, stdout,file

#log4j.logger.org.hibernate=info
#log4j.logger.org.hibernate=debug

### log HQL query parser activity
#log4j.logger.org.hibernate.hql.ast.AST=debug

### log just the SQL
log4j.logger.org.hibernate.SQL=debug

### log JDBC bind parameters ###
#log4j.logger.org.hibernate.type=info
#log4j.logger.org.hibernate.type=debug

### log schema export/update ###
#log4j.logger.org.hibernate.tool.hbm2ddl=debug

### log HQL parse trees
#log4j.logger.org.hibernate.hql=debug

### log cache activity ###
#log4j.logger.org.hibernate.cache=debug

### log transaction activity
#log4j.logger.org.hibernate.transaction=debug

### log JDBC resource acquisition
log4j.logger.org.hibernate.jdbc=debug

### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
log4j.logger.com.shjx.action = debug

### log JDBCTemplate
log4j.logger.org.springframework.jdbc.core.JdbcTemplate = debug

以上是关于log4j.properties配置文件的主要内容,如果未能解决你的问题,请参考以下文章

log4j.properties配置文件一些理解

log4j.properties 的作用是啥?求详解

log4j.properties配置详解

log4j.properties 日志文件的详细配置说明

log4j.properties配置文件

log4j.properties配置文件