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
|