-->
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: Please help. controlling the verbosity of the logger.
PostPosted: Wed Jan 14, 2004 3:30 pm 
Beginner
Beginner

Joined: Tue Nov 18, 2003 12:34 am
Posts: 39
Location: Dallas, Texas, US
I understand that Hibernate is using commons-logging, which uses log4j as the dfault logger. I dont have log4j.jar in the path and that should enable commons-logging to use the jdk14logger (I am using jdk1.4.2). Now, while executing new Configuration(), Hibernate prints a lot of "INFO" messages to the console and I would like to disable them. Is there any easy way of doing this? Can having commons-logging.properties in the path help achieve this? How? Any ideas??? Please help....
Thanks a lot.
Madhan.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 14, 2004 6:33 pm 
Regular
Regular

Joined: Tue Aug 26, 2003 7:53 pm
Posts: 66
Location: Lakeland, Florida USA
I'd had success limiting the output with the following,

log4j.logger.net.sf.hibernate.transaction=debug
log4j.logger.net.sf.hibernate.cache=debug
log4j.logger.net.sf.hibernate=warn
log4j.logger.net.sf.hibernate.cfg.Binder=warn
log4j.logger.net.sf.hibernate.cfg.Environment=debug
log4j.logger.net.sf.hibernate.util.DTDEntityResolver=warn
log4j.logger.net.sf.hibernate.engine.Cascades=warn
log4j.logger.net.sf.hibernate.impl.SessionImpl=warn

However, I change to debug level whenever there is a problem because the logs will most likely tell you what's wrong. Also, reading the logs is a great way to learn Hibernate.

Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 14, 2004 6:38 pm 
Beginner
Beginner

Joined: Tue Nov 18, 2003 12:34 am
Posts: 39
Location: Dallas, Texas, US
Thanks! I am not using log4j. I finally figured that commons-logging was using JDK14Logger and it was using jdk_home/jre/lib/logging.properties file and it lets me control the verbosity (using the settings similiar to the ones that you mentioned)
Madhan.


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.