-->
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.  [ 8 posts ] 
Author Message
 Post subject: Turn off Hibernate Logging
PostPosted: Tue May 01, 2007 12:16 pm 
Newbie

Joined: Tue Jan 23, 2007 9:42 pm
Posts: 6
Location: Kansas City, MO USA
How do you turn off logging in Hibernate 3?

My log4j.properties file reads:
log4j.rootLogger=OFF


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 1:25 am 
Senior
Senior

Joined: Sat Aug 19, 2006 6:31 pm
Posts: 139
That will turn off ALL logging.

To turn just hibernate's logging off

add the following line

log4j.logger.org.hibernate=OFF

_________________
Don't forget to rate the reply if it helps..:)

Budyanto


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 10:35 am 
Newbie

Joined: Tue Jan 23, 2007 9:42 pm
Posts: 6
Location: Kansas City, MO USA
I've tried to both, neither worked. I still see all the Hibernate logging.

Maybe it's that java.util.logging is being used instead of log4j? How can I determine this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 12:32 pm 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
What application server are you using?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 3:14 pm 
Newbie

Joined: Tue Jan 23, 2007 9:42 pm
Posts: 6
Location: Kansas City, MO USA
No application server. Just a simple POJO application.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 3:20 pm 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Hibernate uses commons-logging to do it's logging. Make sure there's no oddball commons-logging.properties (or other commons-logging configuration parameters, e.g. JRE system properties) around.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 6:25 pm 
Senior
Senior

Joined: Sat Aug 19, 2006 6:31 pm
Posts: 139
You can try modifying .level in $JAVA_HOME/jre/lib/logging.properties. This is the default config file used by java.util.logging.

See if that changes anything.

_________________
Don't forget to rate the reply if it helps..:)

Budyanto


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 03, 2007 10:08 am 
Newbie

Joined: Tue Jan 23, 2007 9:42 pm
Posts: 6
Location: Kansas City, MO USA
Turns out that the log4j.jar file was not in my classpath. I feel like such a noob.

Note to self:
Ask yourself: Is it plugged in? Is the power light on?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.