-->
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.  [ 2 posts ] 
Author Message
 Post subject: Set logging in hibernate.cfg.xml
PostPosted: Wed Mar 04, 2009 6:20 am 
Newbie

Joined: Wed Mar 04, 2009 6:06 am
Posts: 1
Hi,
i am having trouble with some log messages in our server log. These messages comes from HbmBinder.java line 300 (hibernate version 3.2.6):

Code:
log.info(
            "Mapping class: " + entity.getEntityName() +
            " -> " + entity.getTable().getName()
         );

and Configuration.java line 305 (hibernate version 3.2.6):

Code:
log.info( "Reading mappings from file: " + xmlFile.getPath() );

The server administrator complains about these messages, i think they end up in error log for some unknown reason. I would change the debug settings in log4j.properties, unfortunately they would apply for all applications on the server, therefore I would like to change the settings in hibernate.cfg.xml, if that is possible. But so far I wasn't able to find information how to do it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 05, 2009 5:41 pm 
Senior
Senior

Joined: Tue Aug 01, 2006 9:24 pm
Posts: 120
this is probably something you already thought about, but I use something like this when I debug to get rid of some of the noise.

log4j.logger.org.hibernate=WARN
log4j.logger.org.hibernate.SQL=DEBUG

You could just filter out the specific classes, even though it's for the whole server.

log4j.logger.org.hibernate.cfg.HbmBinder=WARN

It's not a perfect solution. Maybe someone else can give you a better answer then this.

_________________
Please rate my replies as I need points for all of my questions also.


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