-->
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: Hibernate Logging hide sql data
PostPosted: Wed Jul 03, 2013 6:55 am 
Newbie

Joined: Wed Jul 03, 2013 6:46 am
Posts: 1
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.


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.