[hibernate-issues] [JIRA] (HHH-14139) BasicBinder Trace Logging Causes Duplicated Message
Chris Popp (JIRA)
jira at hibernate.atlassian.net
Thu Aug 6 21:47:23 EDT 2020
Chris Popp ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A2583fc20-4794-42d4-a803-9400cc1594f7 ) *commented* on HHH-14139 ( https://hibernate.atlassian.net/browse/HHH-14139?atlOrigin=eyJpIjoiMTc2MDVkNzU5YWJkNDg1NmFlOWRiMzYyYjNlZWMwY2YiLCJwIjoiaiJ9 )
Re: BasicBinder Trace Logging Causes Duplicated Message ( https://hibernate.atlassian.net/browse/HHH-14139?atlOrigin=eyJpIjoiMTc2MDVkNzU5YWJkNDg1NmFlOWRiMzYyYjNlZWMwY2YiLCJwIjoiaiJ9 )
It was a Spring boot based project using spring start logging so the logging was a little more complex than I anticipated but I created a simple reproduction.
* I created a simple maven project with these dependencies
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.19.Final</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.13.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.13.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>
* And then ran this test class
public class LogTest {
public static void main(String[] args) throws Exception {
Logger root = (Logger)LoggerFactory.getLogger(BasicBinder.class);
root.setLevel(Level.TRACE);
BasicBinder basicBinder = new TestBinder();
basicBinder.bind(null, "{}", "someName", null);
}
private static class TestBinder extends BasicBinder {
public TestBinder() {
super(new StringTypeDescriptor(), new VarcharTypeDescriptor());
}
@Override
protected void doBind(CallableStatement st, Object value, String name, WrapperOptions options) throws SQLException {
}
@Override
protected void doBind(PreparedStatement st, Object value, int index, WrapperOptions options)throws SQLException {
}
}
}
* And saw the following when I ran it
>
>
>
> 20:44:06.561 [main] DEBUG org.jboss.logging - Logging Provider:
> org.jboss.logging.Log4j2LoggerProvider
>
>
>
> 20:44:06.582 [main] TRACE org.hibernate.type.descriptor.sql.BasicBinder -
> binding parameter [someName] as [VARCHAR] - [binding parameter [someName]
> as [VARCHAR] - [{}]]
>
>
( https://hibernate.atlassian.net/browse/HHH-14139#add-comment?atlOrigin=eyJpIjoiMTc2MDVkNzU5YWJkNDg1NmFlOWRiMzYyYjNlZWMwY2YiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14139#add-comment?atlOrigin=eyJpIjoiMTc2MDVkNzU5YWJkNDg1NmFlOWRiMzYyYjNlZWMwY2YiLCJwIjoiaiJ9 )
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/20200807/9a9e7766/attachment.html
More information about the hibernate-issues
mailing list