-->
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.  [ 3 posts ] 
Author Message
 Post subject: hypernate console output
PostPosted: Wed Jul 07, 2004 5:43 am 
Newbie

Joined: Wed Jul 07, 2004 5:35 am
Posts: 7
Location: L
hello there,

i have only a simple question. Hypernate is giving a lot of output to the console when creating the Configuration object and so on. Can anybody tell me how to stop this? I know, this is a silly question, but i do not found the answer yet.

Thanks

Angry Angel

Here is some of the output i mean:

Jul 7, 2004 11:21:36 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.4
Jul 7, 2004 11:21:36 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=net.sf.ehcache.hibernate.Provider, hibernate.cache.use_query_cache=true, hibernate.max_fetch_depth=1, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=root, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.url=jdbc:mysql://localhost/test, hibernate.connection.password=, hibernate.connection.pool_size=1}
Jul 7, 2004 11:21:36 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: using java.io streams to persist binary types
Jul 7, 2004 11:21:36 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Jul 7, 2004 11:21:36 AM net.sf.hibernate.cfg.Configuration addClass


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 07, 2004 5:44 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Hibernate uses commons-logging, which in turn uses JDK 1.4 or Log4j logging. So, configure either Log4j or JDK 1.4.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 02, 2004 4:24 am 
Newbie

Joined: Mon Dec 29, 2003 6:13 am
Posts: 3
If you're using log4j, you have several options for disabling logging.


1. To disable all hibernate logging, change this line in your log4j.properties file:
Code:
log4j.logger.net.sf.hibernate=info

to: =warn or =error or =fatal.


2. To disable most of the configuration logging, add this to your log4j.properties file:
Code:
### log configuration
log4j.logger.net.sf.hibernate.cfg=warn



3. Or you could temporarily disable hibernate logging with:
Code:
org.apache.log4j.Logger.getLogger("net.sf.hibernate").setLevel(org.apache.log4j.Level.WARN);

and then reset logging after startup with:
Code:
org.apache.log4j.Logger.getLogger("net.sf.hibernate").setLevel(org.apache.log4j.Level.INFO);


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

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.