Community
Participate
Working Groups
Our current SQL logging (when log level is set to FINE or greater) produces the following example log message: [EL Fine]: 2010-11-09 15:22:17.107--ClientSession(26061809)--Connection(16925102)--Thread(Thread[main,5,main])--INSERT INTO DYNAMIC_ADDRESS (ADDRESS_ID, CITY, COUNTRY, P_CODE, PROVINCE, STREET) VALUES (?, ?, ?, ?, ?, ?) bind => [528, Ottawa, Canada, K1G6P3, ON, 123 Street] We should provide users with the ability to hide this sensitive data with a new session property/flag to generate the following instead: [EL Fine]: 2010-11-09 15:22:17.107--ClientSession(26061809)--Connection(16925102)--Thread(Thread[main,5,main])--INSERT INTO DYNAMIC_ADDRESS (ADDRESS_ID, CITY, COUNTRY, P_CODE, PROVINCE, STREET) VALUES (?, ?, ?, ?, ?, ?) bind => [***, ******, ******, ******, **, **********] This same type of information is also included when a SQL exception is encountered and this new flag should also hide the information from there as well.
Created attachment 182813 [details] Proposed changes New JPA persistence unit property added: eclipselink.should-display-data
Created attachment 182903 [details] Updated patch New log message will look as follows: [EL Fine]: 2010-11-09 15:22:17.107--ClientSession(26061809)--Connection(16925102)--Thread(Thread[main,5,main])--INSERT INTO DYNAMIC_ADDRESS (ADDRESS_ID, CITY, COUNTRY, P_CODE, PROVINCE, STREET) VALUES (?, ?, ?, ?, ?, ?) bind => [6 parameters bound]
Changes have been submitted. Reviewed by: Gordon Yorke, James Sutherland, Peter Krogh Changed an extended tests model to hide the bind parameters and manually inspected the log.
>The property below from comment #1 does not exist <property name="eclipselink.should-display-data" value="true"/> >Use the following EclipseLink property to enable parameter value logging <property name="eclipselink.logging.parameters" value="true"/> >from FINE: INSERT INTO UNITOFWORK (ID, ENDTIMESTAMP, EXTENT, INITIAL, MAXPATH, MAXVALUE, RETRIES, STARTTIMESTAMP, VERSION, KNOWNMAX_ID, KNOWNPATH_ID, PROCESSOR_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [12 parameters bound] >to FINE: INSERT INTO UNITOFWORK (ID, STARTTIMESTAMP, VERSION, MAXPATH, EXTENT, INITIAL, RETRIES, ENDTIMESTAMP, MAXVALUE, KNOWNPATH_ID, PROCESSOR_ID, KNOWNMAX_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [5, 1297192198347, 1, 1, 1267650600228229401496704253952, 1267650600228229401496703205377, 0, null, 1, 4, 1, 3]
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink