### 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' ## log4j.rootLogger=info,file log4j.logger.Main=trace,stdout ### Log all SQL DML statements as they are executed ### log4j.logger.org.hibernate.SQL=debug,stdout ### Log all JDBC parameters ### #log4j.logger.org.hibernate.type=info #### Log all SQL DDL statements as they are executed ### log4j.logger.org.hibernate.tool.hbm2ddl=debug,stdout ### Log the state of all entities (max 20 entities) associated with the session at flush time ### #log4j.logger.org.hibernate.pretty=info #### Log all second-level cache activity ### #log4j.logger.org.hibernate.cache=info #### Log transaction related activity ### log4j.logger.org.hibernate.transaction=debug,stdout #### Log all JDBC resource acquisition ### log4j.logger.org.hibernate.jdbc=info,stdout #### Log HQL and SQL ASTs during query parsing ### #log4j.logger.org.hibernate.hql.ast.AST=info #### Log all JAAS authorization requests ### #log4j.logger.org.hibernate.secure=info #### Log everything (a lot of information, but very useful for troubleshooting) ### #log4j.logger.org.hibernate=info