Skip to content

Commit afb9a1e

Browse files
authored
Add missing logger metadata for Hibernate 6.2 (#297) (#298)
Tests are provided when possible.
1 parent d8b2d67 commit afb9a1e

File tree

4 files changed

+72
-20
lines changed

4 files changed

+72
-20
lines changed

metadata/org.hibernate.orm/hibernate-core/6.2.0.Final/reflect-config.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,5 +896,35 @@
896896
"condition":{"typeReachable":"org.hibernate.metamodel.mapping.MappingModelCreationLogging"},
897897
"name":"org.hibernate.metamodel.mapping.MappingModelCreationLogging_$logger",
898898
"methods":[{"name":"<init>","parameterTypes":["org.jboss.logging.Logger"] }]
899+
},
900+
{
901+
"condition":{"typeReachable":"org.hibernate.engine.jdbc.env.internal.LobCreationLogging"},
902+
"name":"org.hibernate.engine.jdbc.env.internal.LobCreationLogging_$logger",
903+
"methods":[{"name":"<init>","parameterTypes":["org.jboss.logging.Logger"] }]
904+
},
905+
{
906+
"condition":{"typeReachable":"org.hibernate.boot.jaxb.JaxbLogger"},
907+
"name":"org.hibernate.boot.jaxb.JaxbLogger_$logger",
908+
"methods":[{"name":"<init>","parameterTypes":["org.jboss.logging.Logger"] }]
909+
},
910+
{
911+
"condition":{"typeReachable":"org.hibernate.cache.spi.SecondLevelCacheLogger"},
912+
"name":"org.hibernate.cache.spi.SecondLevelCacheLogger_$logger",
913+
"methods":[{"name":"<init>","parameterTypes":["org.jboss.logging.Logger"] }]
914+
},
915+
{
916+
"condition":{"typeReachable":"org.hibernate.engine.jdbc.JdbcLogging"},
917+
"name":"org.hibernate.engine.jdbc.JdbcLogging_$logger",
918+
"methods":[{"name":"<init>","parameterTypes":["org.jboss.logging.Logger"] }]
919+
},
920+
{
921+
"condition":{"typeReachable":"org.hibernate.resource.beans.internal.BeansMessageLogger"},
922+
"name":"org.hibernate.resource.beans.internal.BeansMessageLogger_$logger",
923+
"methods":[{"name":"<init>","parameterTypes":["org.jboss.logging.Logger"] }]
924+
},
925+
{
926+
"condition":{"typeReachable":"org.hibernate.sql.results.graph.embeddable.EmbeddableLoadingLogger"},
927+
"name":"org.hibernate.sql.results.graph.embeddable.EmbeddableLoadingLogger_$logger",
928+
"methods":[{"name":"<init>","parameterTypes":["org.jboss.logging.Logger"] }]
899929
}
900930
]

tests/src/org.hibernate.orm/hibernate-core/6.2.0.Final/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dependencies {
1818
testImplementation 'jakarta.validation:jakarta.validation-api:3.0.2'
1919
testImplementation 'org.postgresql:postgresql:42.6.0'
2020
testImplementation 'com.oracle.database.jdbc:ojdbc11:21.9.0.0'
21+
testImplementation 'org.jboss.logging:jboss-logging:3.5.0.Final'
2122

2223
testImplementation 'ch.qos.logback:logback-classic:1.4.5'
2324
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright and related rights waived via CC0
3+
*
4+
* You should have received a copy of the CC0 legalcode along with this
5+
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
6+
*/
7+
package org_hibernate_orm.hibernate_core;
8+
9+
import java.net.URL;
10+
11+
import org.hibernate.boot.jaxb.JaxbLogger;
12+
import org.hibernate.cache.spi.SecondLevelCacheLogger;
13+
import org.hibernate.internal.log.UrlMessageBundle;
14+
import org.hibernate.sql.results.graph.embeddable.EmbeddableLoadingLogger;
15+
import org.junit.jupiter.api.Test;
16+
17+
import static org.assertj.core.api.Assertions.assertThat;
18+
19+
public class LoggerTest {
20+
21+
@Test
22+
public void urlMessageBundleLogger() throws Exception {
23+
UrlMessageBundle.URL_MESSAGE_LOGGER.logFileIsNotDirectory(new URL("file:"));
24+
}
25+
26+
@Test
27+
public void jaxbLogger() {
28+
assertThat(JaxbLogger.JAXB_LOGGER.TRACE_ENABLED).isFalse();
29+
}
30+
31+
@Test
32+
public void secondLevelCacheLogger() {
33+
assertThat(SecondLevelCacheLogger.L2CACHE_LOGGER.TRACE_ENABLED).isFalse();
34+
}
35+
36+
@Test
37+
public void embeddableLoadingLogger() {
38+
assertThat(EmbeddableLoadingLogger.EMBEDDED_LOAD_LOGGER.isTraceEnabled()).isFalse();
39+
}
40+
41+
}

tests/src/org.hibernate.orm/hibernate-core/6.2.0.Final/src/test/java/org_hibernate_orm/hibernate_core/UrlMessageBundleTest.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)