[hibernate-issues] [JIRA] (HHH-14139) BasicBinder Trace Logging Causes Duplicated Messagee

Chris Popp (JIRA) jira at hibernate.atlassian.net
Thu Aug 6 19:26:19 EDT 2020


Chris Popp ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A2583fc20-4794-42d4-a803-9400cc1594f7 ) *created* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZGM4YTkwODkwNmIyNGMwYTlmNTU0MWM4YTAwYjMyY2QiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14139?atlOrigin=eyJpIjoiZGM4YTkwODkwNmIyNGMwYTlmNTU0MWM4YTAwYjMyY2QiLCJwIjoiaiJ9 ) HHH-14139 ( https://hibernate.atlassian.net/browse/HHH-14139?atlOrigin=eyJpIjoiZGM4YTkwODkwNmIyNGMwYTlmNTU0MWM4YTAwYjMyY2QiLCJwIjoiaiJ9 ) BasicBinder Trace Logging Causes Duplicated Messagee ( https://hibernate.atlassian.net/browse/HHH-14139?atlOrigin=eyJpIjoiZGM4YTkwODkwNmIyNGMwYTlmNTU0MWM4YTAwYjMyY2QiLCJwIjoiaiJ9 )

Issue Type: Bug Affects Versions: 6.0.0.Alpha5, 5.4.19 Assignee: Unassigned Created: 06/Aug/2020 16:26 PM Priority: Major Reporter: Chris Popp ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A2583fc20-4794-42d4-a803-9400cc1594f7 )

When binding a parameter that includes the text {} the BasicBinder String.format call will include the value as part of the messagePattern passed to the logger. When using log4j {} is interpreted as a variable to be replaced by a argument, and since no arguments are supplied the entire message is considered to be an argument.

As a result, when a log message should be: binding parameter [2] as [VARCHAR] - [{}]
it ends up getting logged as: binding parameter [2] as [VARCHAR] - [binding parameter [2] as [VARCHAR] - [{}]]

( https://hibernate.atlassian.net/browse/HHH-14139#add-comment?atlOrigin=eyJpIjoiZGM4YTkwODkwNmIyNGMwYTlmNTU0MWM4YTAwYjMyY2QiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14139#add-comment?atlOrigin=eyJpIjoiZGM4YTkwODkwNmIyNGMwYTlmNTU0MWM4YTAwYjMyY2QiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100141- sha1:76df2fe )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200806/b47e8d1d/attachment.html 


More information about the hibernate-issues mailing list