Skip to content

Conversation

@11rx4f
Copy link

@11rx4f 11rx4f commented Feb 2, 2022

EclipseLink can print SQL statement sent to the database and control logging by the persistence unit property eclipselink.logging.level.sql(log level).
On the otherhand, EclipseLink throws exception when failed to execute SQL statement.
According to the following document, the SQL statement be only logged for log level < CONFIG in exceptions.
https://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Log_Level_Configuration

This property will also control how parameters are logged in exceptions. By default parameters are only logged for log level < CONFIG.

However, when exception is thrown, SQL statement is always logged in exceptions regardless of log level.
It should be only logged for log level < CONFIG.

Signed-off-by: Ryosuke Okada [email protected]

…eclipselink.logging.level.sql is OFF

Signed-off-by: Ryosuke Okada <[email protected]>
Signed-off-by: Ryosuke Okada <[email protected]>
@11rx4f
Copy link
Author

11rx4f commented Apr 5, 2022

Could anyone review this patch?

@11rx4f 11rx4f changed the title fix #1408 SQL statement is printed in exceptions despite eclipselink.logging.level.sql is OFF [master] fix #1408 SQL statement is printed in exceptions despite eclipselink.logging.level.sql is OFF Apr 28, 2022
@11rx4f
Copy link
Author

11rx4f commented May 24, 2022

@dazey3 @Tomas-Kraus @rfelcman @lukasj
Could you review this patch?
Because of this problem, we cannot handle by the property whether or not to print SQL statements in exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQL statement is printed in exceptions despite eclipselink.logging.level.sql is OFF

1 participant