-->
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.  [ 5 posts ] 
Author Message
 Post subject: Turning "show_sql" on and off programmatically
PostPosted: Thu Dec 15, 2005 2:39 pm 
Newbie

Joined: Thu Dec 15, 2005 2:30 pm
Posts: 10
Is it possible to flip "hibernate.show_sql" property on and off programmatically? I would like to start off with no SQL being shown and only display queries displayed for few specific database access calls. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 6:56 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
i think that you have to rebuild session after change environment, but you can do what you want with extract sql query from query translator - see example in HQLTest for usage
query translator


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 2:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
much better to use the log4j categories org.hibernate.SQL if you want to dynamically control when it should output.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 8:37 am 
Newbie

Joined: Thu Oct 20, 2005 7:48 am
Posts: 19
for this u have to maintain exatra code/method .
it's batter that you use log4j to show and hide SQL.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 1:31 pm 
Newbie

Joined: Thu Dec 15, 2005 2:30 pm
Posts: 10
Didn't think about using log4j and turning IT on and off. Thanks!


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