eam1813
eam1813

Reputation: 153

Logging SQL on error only

I am currently logging sql from hibernate using p6spy in order to get the full sql with the parameters in it so it can be copied and pasted easier for debugging. However I want to log only when the database has an error. Is there anyway to achieve this while still maintaining the SQL with the parameters still in it using p6spy or a different tool. to be clear when I say still in it I mean, for example, that instead of saying SELECT * from employee where employee.id = ? it would say SELECT * from employee where employee.id = 28.

Upvotes: 1

Views: 177

Answers (0)

Related Questions