2

Is there any way that Hibernate exception message could be controlled so that it doesn't include the placeholder data for the failed query. e.g. for a failed insert query (lets say constraint violation), hibernate logs the exception with the input data. For privacy purpose, this needs to be removed from the logs.

1 Answer 1

1

I am not aware of any Hibernate configuration for this, but I would say that this is more suitable for logging configuration anyway.

For example, in log4j you could write custom appender/layout to intercept and replace the messages with the desired content.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.