-->
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: logging sql parameters in jboss
PostPosted: Tue May 16, 2006 7:05 am 
Newbie

Joined: Tue May 16, 2006 6:57 am
Posts: 1
Hello, I'm using hibernate with jboss. Hibernate logs sql like following:
select * from ....... where someId=?
and I'd like to know values of this '?', value of someId. Is it possible to set logging to log file to log this information? I tried ShowSqlEnabled to true in jboss-service.xml but it is not enough, also CommentsEnabled didn't help. Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 16, 2006 7:36 am 
Regular
Regular

Joined: Wed Aug 25, 2004 6:23 am
Posts: 91
You can enable it with a Log4j config something like this:-

Code:
<!-- Log the SQL generated by Hibernate -->
<category name="org.hibernate.SQL">
<priority value="debug">
</category>
<!-- Log the parameter substitutions in the SQL statement.  -->
<category name="org.hibernate.type">
<priority value="debug">
</category>


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.