-->
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.  [ 4 posts ] 
Author Message
 Post subject: disabling of trace level logging
PostPosted: Sun Jan 07, 2007 10:51 am 
Newbie

Joined: Mon Dec 11, 2006 5:30 am
Posts: 8
What should we do to disable trace level logging in case of Hibernate when we are using log4j.xml for logging purposes because it consumes a lot of time in case of calling function log() of org.hibernate.type.Nullabletype class.

We have tried different options that are as follows:-

1)Set org.apache.log4j.Logger.getLogger("net.sf.hibernate").setLevel(org.apache.log4j.Level.FATAL)

2)Set <category name="log4j.logger.org.hibernate.type"><priority value="FATAL"/></category>

3)Set <category name="log4j.logger.net.sf.hibernate "><priority value="FATAL"/></category>

Regards,
Jamunt


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 11:02 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Which logs do you have in the console? Are you speaking about general hibernate logs, or about the generated SQL?

If you speak about the SQL, also check the hibernate.cfg.xml file to see if the "show_sql" property is actually set to false. Apart from this, setting org.hibernate logging level to, say, warn or error should already be sufficient to remove a big part of of the logs.

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 11:26 am 
Newbie

Joined: Mon Dec 25, 2006 3:14 pm
Posts: 18
You should set the level to "org.hibernate" logger


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 25, 2007 11:34 am 
Newbie

Joined: Thu Jan 25, 2007 11:07 am
Posts: 2
Yep.. it works good as batmat suggested.

<category name="org.hibernate"><priority value="fatal"/></category>

Using the ablove tag in your log4j.xml will solve the problem

OR

Set
org.hibernate = fatal in you log4j.properties file

This will limit your log output.

Hope this info helps!


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