-->
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: how to hide information of inicialization
PostPosted: Thu Jul 28, 2005 11:41 am 
Newbie

Joined: Tue Jul 12, 2005 2:46 pm
Posts: 13
Location: BS2
How to hide information of inicialization?

I want hide this
28/07/2005 11:45:01 net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.3
..............................
INFO: no JNDI name configured


Hibernate version: 2

The generated SQL (show_sql=false):


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 4:43 pm 
Senior
Senior

Joined: Wed Jul 13, 2005 4:31 pm
Posts: 142
Location: Seattle, WA
To not output INFO messages from hibernate...you need to change the log4j.properties to have ...

log4j.logger.org.hibernate=warn
or
log4j.logger.org.hibernate=error

instead of

log4j.logger.org.hibernate=info


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 6:47 pm 
Regular
Regular

Joined: Wed May 11, 2005 11:57 pm
Posts: 80
This will disable the particular message in either Hibernate2 or 3.

Code:
Logger.getLogger("net.sf.hibernate.cfg.Environment").setLevel(Level.WARNING);
Logger.getLogger("org.hibernate.cfg.Environment").setLevel(Level.WARNING);


You can try shortening the prefixes, ie. "net.sf.hibernate.cfg" to limit the information even more, or "net.sf.hibernate" to turn off almost all Hibernate-related logging.

This can also be done in config files instead of in Java code, but it's more implementation-specific.


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.