-->
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: configuring hibernate logging
PostPosted: Fri Mar 24, 2006 11:34 am 
Newbie

Joined: Fri Mar 24, 2006 11:27 am
Posts: 1
Hi, is it possible to configure hibernate log (log4j) ??? A have an aplication where i need to get some information writen in console, but, hibernate writes a lot of log in console... i´d like to disable hibernate log for a while. What can i do?? I can´t find log4j.properties....

thanks

Augusto


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 11:57 am 
Regular
Regular

Joined: Wed Nov 17, 2004 11:49 am
Posts: 65
Location: Pittsburgh
in your log4j.properties file include something like:

Code:
log4j.logger.org.hibernate=WARN


in hibernate.properties turn of SQL logging with:


Code:
## print all generated SQL to the console
hibernate.show_sql false


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 12:00 pm 
Regular
Regular

Joined: Wed Nov 17, 2004 11:49 am
Posts: 65
Location: Pittsburgh
btw, hibernate ships with a log4.properties template in the ./etc directory that you can use by including it at the root of your classpath.


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.