I want to disable all logging using the following log4j.properties file:
### 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=warn, stdout
log4j.logger.net.sf.hibernate=off
### log just the SQL
log4j.logger.net.sf.hibernate.SQL=off
### log JDBC bind parameters ###
log4j.logger.net.sf.hibernate.type=off
### log schema export/update ###
log4j.logger.net.sf.hibernate.tool.hbm2ddl=off
### log cache activity ###
log4j.logger.net.sf.hibernate.cache=off
### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=off
but I still get a lot of logging - see trace excerpt belowe!
For production use I need to disable ALL printouts (for max performance) except critical errors etc - how do I do this?????
Hibernate version:2.1
Mapping documents:NA
Code between sessionFactory.openSession() and session.close():NA
Full stack trace of any exception that occurs:NA
Name and version of the database you are using:MySQL
The generated SQL (show_sql=true):NA
Debug level Hibernate log excerpt: Hibernate: insert into LogData (time, sequenceNumber, source, recordType, description) values (?, ?, ?, ?, ?) Hibernate: insert into TracingData (sourceClass, sourceMethod, threadId, id) values (?, ?, ?, ?) Hibernate: insert into LogData (time, sequenceNumber, source, recordType, description) values (?, ?, ?, ?, ?) Hibernate: insert into TracingData (sourceClass, sourceMethod, threadId, id) values (?, ?, ?, ?) Hibernate: insert into LogData (time, sequenceNumber, source, recordType, description) values (?, ?, ?, ?, ?) Hibernate: insert into TracingData (sourceClass, sourceMethod, threadId, id) values (?, ?, ?, ?) Hibernate: insert into LogData (time, sequenceNumber, source, recordType, description) values (?, ?, ?, ?, ?) Hibernate: insert into arguments (id, arg, argument) values (?, ?, ?) Hibernate: insert into arguments (id, arg, argument) values (?, ?, ?) Hibernate: insert into arguments (id, arg, argument) values (?, ?, ?) Hibernate: insert into arguments (id, arg, argument) values (?, ?, ?) Hibernate: insert into arguments (id, arg, argument) values (?, ?, ?) Hibernate: insert into arguments (id, arg, argument) values (?, ?, ?) Hibernate: insert into arguments (id, arg, argument) values (?, ?, ?)
|