-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: log4j print hibenate cache messages
PostPosted: Thu Nov 09, 2006 1:14 pm 
Beginner
Beginner

Joined: Thu Nov 02, 2006 2:23 pm
Posts: 33
Hey,

I am using hibernate 3.1

I am using in log4j for kettle (Open source for ETL).
I dont want that hibernate will write any logs, so i create a log4j.properties file and set all hibernate appenders(include cache and resource pool) to be off , but in some cases there are hibernate log messages in my log.

Code:
2006/11/09 19:05:52 - Caching: com.mercado.s2002.analysis.objects.Criterion#-202
5978223
2006/11/09 19:05:52 - key: com.mercado.s2002.analysis.objects.Criterion#-2025978
223
2006/11/09 19:05:52 - hibernate.test.com.mercado.s2002.analysis.objects.Criterio
nCache: hibernate.test.com.mercado.s2002.analysis.objects.CriterionMemoryStore h
it for com.mercado.s2002.analysis.objects.Criterion#-2025978223
2006/11/09 19:05:52 - Item was already cached: com.mercado.s2002.analysis.object
s.Criterion#-2025978223
2006/11/09 19:05:52 - trace com.mchange.v2.resourcepool.BasicResourcePool@f6ac0b
[managed: 4, unused: 3, excluded: 32] (e.g. com.mchange.v2.c3p0.impl.NewPooledC


How can i prevent hibenate to write those (or any other) log messages???

here is my log4jproperties:
Code:

log4j.rootLogger=DEBUG, AppendToConsole

### direct log messages to stdout ###
log4j.appender.AppendToConsole=org.apache.log4j.ConsoleAppender
log4j.appender.AppendToConsole.Target=System.out
log4j.appender.AppendToConsole.Threshold=off
log4j.appender.AppendToConsole.layout=org.apache.log4j.PatternLayout
log4j.appender.AppendToConsole.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
   
 
### set log levels - for more verbose logging change 'info' to 'DEBUG' ###
#log4j.threshold=off
log4j.additivity=false


log4j.logger.com.mercado.s2002.analysis.kettle=info
log4j.logger.com.mercado.s2002.analysis.objects=off
log4j.logger.com.mercado.s2002.analysis.objects.impl=off
log4j.logger.com.mchange=off
log4j.logger.org.hibernate=off
log4j.logger.hibernate.test=off

#log4j.logger.org.hibernate=error

############# connection pool logger
#log4j.logger.com.mchange.v2.c3p0=warn
### 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=off
log4j.logger.net.sf.ehcache=off

### 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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.