Мое приложение использует Hibernate с Ehcache.
Я настроил log4j с этим log4j.properties:
# Configure the console as our one appender
log4j.rootLogger = INFO, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
log4j.logger.org.hibernate=info
### log HQL query parser activity
log4j.logger.org.hibernate.hql.ast.AST=info
### log just the SQL
log4j.logger.org.hibernate.SQL=info
### log JDBC bind parameters ###
log4j.logger.org.hibernate.type=info
### log schema export/update ###
log4j.logger.org.hibernate.tool.hbm2ddl=info
### log HQL parse trees
log4j.logger.org.hibernate.hql=info
### log cache activity ###
log4j.logger.org.hibernate.cache=info
### log transaction activity
log4j.logger.org.hibernate.transaction=info
### log JDBC resource acquisition
log4j.logger.org.hibernate.jdbc=info
### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=info
Но в выводе консоли у меня очень много строк журнала, таких как:
22:42:06.603 [Thread-15] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_time -> org.hibernate.type.AdaptedImmutableType@1bdedf8
22:42:06.603 [Thread-15] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_timestamp -> org.hibernate.type.AdaptedImmutableType@5264dc
22:42:06.603 [Thread-15] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_dbtimestamp -> org.hibernate.type.AdaptedImmutableType@15bd8eb
22:42:06.603 [Thread-15] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_calendar -> org.hibernate.type.AdaptedImmutableType@fe4dd2
22:42:06.603 [Thread-15] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_calendar_date -> org.hibernate.type.AdaptedImmutableType@1a751ff
22:42:06.603 [Thread-15] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_binary -> org.hibernate.type.AdaptedImmutableType@1f86f75
22:42:06.603 [Thread-15] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_serializable -> org.hibernate.type.AdaptedImmutableType@15daaef
22:42:06.603 [Thread-15] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration materialized_blob -> org.hibernate.type.MaterializedBlobType@9d5241
22:42:06.604 [Thread-15] DEBUG n.s.e.config.ConfigurationFactory - Configuring ehcache from InputStream
22:42:06.606 [Thread-15] DEBUG net.sf.ehcache.config.BeanHandler - Ignoring ehcache attribute xmlns:xsi
Возможно ли отключить эти сообщения отладки? Я не могу найти никакого рабочего решения.
Заранее спасибо!
PS. pom.xml содержит только:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
</dependency>