-->
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.  [ 1 post ] 
Author Message
 Post subject: Log the parameter substitutions in the SQL statement
PostPosted: Wed Jul 12, 2006 1:45 am 
Newbie

Joined: Wed Jul 12, 2006 12:31 am
Posts: 1
Hi!
At a minimum I need to handle all exceptions that are caused by sending SQL to the database to log the SQL and all parameters bound to the SQL.

Now, by configuring log4j appropriately it will log the SQL and bound parameters but will log a lot of other junk as well.

I am interested in extracting just the SQL and parameter values and using the same in a custom log format.

Is it possible to use any of the hibernate API's to extract both SQL and bind parameter values?

It seems that According to the Hibernate API docs,
public String getSQL()
Will only get the actual SQL statement that caused the exception (may be null)

thanks!

Steve


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.