-->
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: Logging Parameters
PostPosted: Thu Mar 23, 2006 1:29 pm 
Beginner
Beginner

Joined: Mon Nov 22, 2004 8:53 pm
Posts: 23
Hibernate logs SQL executed to the 'org.hibernate.SQL' category on one line. And the parameters/return value to the 'org.hibernate.type.*' categories, each on their own line.

Is there any way to get a condensed version of the parameters on a single line?

Our custom framework does this now and our logs are >4GBs per day, much of which is SQL. We're concerned that when we migrate to Hibernate the size of our logs will greatly increase because of the items we include in our patternlayout for each line (none of which can be removed).

thanks.
-peter


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 12:43 pm 
Expert
Expert

Joined: Mon Jan 09, 2006 5:01 pm
Posts: 311
Location: Sacramento, CA
log4j configuration issue...right? check out the log4j.properties in your classpath.

_________________
-JT

If you find my replies helpful, please rate by clicking 'Y' on them. I appreciate it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 3:38 pm 
Beginner
Beginner

Joined: Mon Nov 22, 2004 8:53 pm
Posts: 23
jt_1000 wrote:
log4j configuration issue...right? check out the log4j.properties in your classpath.


No, log4j is configured fine. Hibernate calls the log method (debug()) once for each parameter, which can get very verbose. I would like to know if there is any way for it to call the log method one time with all of the parameters.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 4:18 pm 
Expert
Expert

Joined: Mon Jan 09, 2006 5:01 pm
Posts: 311
Location: Sacramento, CA
Yes - I see what you want, but that would mean that the actual hibernate code has a mode, that would concate and batch its output... and I have never heard of such a mechanism...nor would I think that it is available.

To trim the log size - don't run in DEBUG mode, and/or run an external process to kill or archive old log files. (I think that is configurable in log4j also).

_________________
-JT

If you find my replies helpful, please rate by clicking 'Y' on them. I appreciate it.


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.