Hey.
We are running a JEE Project on Glassfish using Hibernate.
Wen we are running in any SQL Error, e.g. inserting data and content of one field is too long,
Hibernate is logging the complete sql statement that fails, including all data.
This is an data privacy issue for us, because here the log file is including user date that should not appear.
Code:
WARNING: SQL Error: 0, SQLState: 22001
SEVERE: Batch entry 0 insert into ...was aborted. Call getNextException to see the cause.
WARNING: SQL Error: 0, SQLState: 22001
SEVERE: ERROR: value too long for type character varying(150)
Now we could avoid thi by setting the org.hibernate loglevel to do not log this at all.
But we would like to keep the issue information like.
Code:
WARNING: SQL Error: 0, SQLState: 22001
SEVERE: ERROR: value too long for type character varying(150)
or better also the insert statement, but without the data that is inserted.
Is there any possibility to configure such a logging behaviour?
Best regards,
Mike.