Skip to content

Commit 75409ae

Browse files
committed
demote many DEBUG-level log messages to TRACE
since Quarkus insists on doing something completely crazy with our INFO level
1 parent f4073da commit 75409ae

File tree

96 files changed

+453
-510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+453
-510
lines changed

hibernate-core/src/main/java/org/hibernate/boot/cfgxml/internal/ConfigLoader.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,7 @@ public Properties loadProperties(String resourceName) {
130130
stream.close();
131131
}
132132
catch (IOException e) {
133-
log.debug(
134-
String.format( "Unable to close properties file [%s] stream", resourceName ),
135-
e
136-
);
133+
log.debug( "Unable to close properties file stream [" + resourceName + "]", e );
137134
}
138135
}
139136
}
@@ -157,10 +154,7 @@ public Properties loadProperties(File file) {
157154
stream.close();
158155
}
159156
catch (IOException e) {
160-
log.debug(
161-
String.format( "Unable to close properties file [%s] stream", file.getAbsolutePath() ),
162-
e
163-
);
157+
log.debug( "Unable to close properties file stream [" + file.getAbsolutePath() + "]", e );
164158
}
165159
}
166160
}

hibernate-core/src/main/java/org/hibernate/boot/internal/BootstrapContextImpl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,27 +308,27 @@ public void addAttributeConverterDescriptor(ConverterDescriptor<?,?> descriptor)
308308
}
309309

310310
void injectJpaTempClassLoader(ClassLoader jpaTempClassLoader) {
311-
log.debugf( "Injecting JPA temp ClassLoader [%s] into BootstrapContext; was [%s]", jpaTempClassLoader, this.getJpaTempClassLoader() );
311+
log.tracef( "Injecting JPA temp ClassLoader [%s] into BootstrapContext; was [%s]", jpaTempClassLoader, this.getJpaTempClassLoader() );
312312
this.classLoaderAccess.injectTempClassLoader( jpaTempClassLoader );
313313
}
314314

315315
void injectScanOptions(ScanOptions scanOptions) {
316-
log.debugf( "Injecting ScanOptions [%s] into BootstrapContext; was [%s]", scanOptions, this.scanOptions );
316+
log.tracef( "Injecting ScanOptions [%s] into BootstrapContext; was [%s]", scanOptions, this.scanOptions );
317317
this.scanOptions = scanOptions;
318318
}
319319

320320
void injectScanEnvironment(ScanEnvironment scanEnvironment) {
321-
log.debugf( "Injecting ScanEnvironment [%s] into BootstrapContext; was [%s]", scanEnvironment, this.scanEnvironment );
321+
log.tracef( "Injecting ScanEnvironment [%s] into BootstrapContext; was [%s]", scanEnvironment, this.scanEnvironment );
322322
this.scanEnvironment = scanEnvironment;
323323
}
324324

325325
void injectScanner(Scanner scanner) {
326-
log.debugf( "Injecting Scanner [%s] into BootstrapContext; was [%s]", scanner, this.scannerSetting );
326+
log.tracef( "Injecting Scanner [%s] into BootstrapContext; was [%s]", scanner, this.scannerSetting );
327327
this.scannerSetting = scanner;
328328
}
329329

330330
void injectArchiveDescriptorFactory(ArchiveDescriptorFactory factory) {
331-
log.debugf( "Injecting ArchiveDescriptorFactory [%s] into BootstrapContext; was [%s]", factory, this.archiveDescriptorFactory );
331+
log.tracef( "Injecting ArchiveDescriptorFactory [%s] into BootstrapContext; was [%s]", factory, this.archiveDescriptorFactory );
332332
this.archiveDescriptorFactory = factory;
333333
}
334334

hibernate-core/src/main/java/org/hibernate/boot/internal/ClassLoaderAccessImpl.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public ClassLoaderAccessImpl(ClassLoaderService classLoaderService) {
4040
}
4141

4242
public void injectTempClassLoader(ClassLoader jpaTempClassLoader) {
43-
log.debugf( "ClassLoaderAccessImpl#injectTempClassLoader(%s) [was %s]", jpaTempClassLoader, this.jpaTempClassLoader );
4443
this.jpaTempClassLoader = jpaTempClassLoader;
4544
}
4645

@@ -55,18 +54,18 @@ public Class<?> classForName(String name) {
5554
return classLoaderService.classForName( name );
5655
}
5756
else {
58-
log.debugf( "Not known whether passed class name [%s] is safe", name );
57+
log.tracef( "Not known whether passed class name [%s] is safe", name );
5958
if ( jpaTempClassLoader == null ) {
60-
log.debugf(
59+
log.tracef(
6160
"No temp ClassLoader provided; using live ClassLoader " +
62-
"for loading potentially unsafe class : %s",
61+
"for loading potentially unsafe class: %s",
6362
name
6463
);
6564
return classLoaderService.classForName( name );
6665
}
6766
else {
68-
log.debugf(
69-
"Temp ClassLoader was provided, so we will use that : %s",
67+
log.tracef(
68+
"Temp ClassLoader was provided, so we will use that: %s",
7069
name
7170
);
7271
try {

hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ public void addImport(String importName, String className) {
903903
throw new IllegalArgumentException( "Import name or entity name is null" );
904904
}
905905
log.tracev( "Import: {0} -> {1}", importName, className);
906-
String old = imports.put( importName, className);
906+
final String old = imports.put( importName, className);
907907
if ( old != null ) {
908908
log.debugf( "import name [%s] overrode previous [{%s}]", importName, old );
909909
}
@@ -1953,7 +1953,7 @@ protected void secondPassCompileForeignKeys(Table table, Set<ForeignKey> done, M
19531953

19541954
private void processPropertyReferences() {
19551955
if ( delayedPropertyReferenceHandlers != null ) {
1956-
log.debug( "Processing association property references" );
1956+
log.trace( "Processing association property references" );
19571957

19581958
for ( DelayedPropertyReferenceHandler delayedPropertyReferenceHandler : delayedPropertyReferenceHandlers ) {
19591959
delayedPropertyReferenceHandler.process( this );
@@ -2107,7 +2107,7 @@ private void handleIdentifierValueBinding(
21072107
// by tools. We want to hold off requiring classes being present until we
21082108
// try to build the SF. Here, just building the Metadata, it is "ok" for an
21092109
// exception to occur, the same exception will happen later as we build the SF.
2110-
log.debugf( "Ignoring exception thrown when trying to build IdentifierGenerator as part of Metadata building", e );
2110+
log.debug( "Ignoring exception thrown when trying to build IdentifierGenerator as part of Metadata building", e );
21112111
}
21122112
}
21132113

hibernate-core/src/main/java/org/hibernate/boot/jaxb/internal/AbstractBinder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ private <X extends T> Binding<X> doBind(XMLEventReader eventReader, Origin origi
9999
}
100100
catch (Exception e) {
101101
log.debug( "Unable to close StAX reader", e );
102-
103102
}
104103
}
105104
}

hibernate-core/src/main/java/org/hibernate/boot/jaxb/internal/CacheableFileXmlSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ private static void writeSerFile(Serializable binding, File xmlFile, File serFil
118118
binding = (Serializable) bindingWrapper.getRoot();
119119
}
120120
try ( FileOutputStream fos = new FileOutputStream( serFile ) ) {
121-
if ( log.isDebugEnabled() ) {
122-
log.debugf( "Writing cache file for: %s to: %s", xmlFile.getAbsolutePath(), serFile.getAbsolutePath() );
121+
if ( log.isTraceEnabled() ) {
122+
log.tracef( "Writing cache file for: %s to: %s", xmlFile.getAbsolutePath(), serFile.getAbsolutePath() );
123123
}
124124
SerializationHelper.serialize( binding, fos );
125125
boolean success = serFile.setLastModified( System.currentTimeMillis() );

hibernate-core/src/main/java/org/hibernate/boot/jaxb/internal/MappingBinder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ protected <X extends JaxbBindableMappingDescriptor> Binding<X> doBind(
163163
Origin origin) {
164164
final String rootElementLocalName = rootElementStartEvent.getName().getLocalPart();
165165
if ( "hibernate-mapping".equals( rootElementLocalName ) ) {
166-
if ( log.isDebugEnabled() ) {
167-
log.debugf( "Performing JAXB binding of hbm.xml document : %s", origin.toString() );
166+
if ( log.isTraceEnabled() ) {
167+
log.tracef( "Performing JAXB binding of hbm.xml document: %s", origin.toString() );
168168
}
169169

170170
final XMLEventReader hbmReader = new HbmEventReader( staxEventReader, xmlEventFactory );
@@ -181,7 +181,7 @@ protected <X extends JaxbBindableMappingDescriptor> Binding<X> doBind(
181181
else {
182182
assert "entity-mappings".equals( rootElementLocalName );
183183
try {
184-
log.debugf( "Performing JAXB binding of orm.xml document : %s", origin.toString() );
184+
log.tracef( "Performing JAXB binding of orm.xml document: %s", origin.toString() );
185185

186186
final XMLEventReader reader = new MappingEventReader( staxEventReader, xmlEventFactory );
187187
final JaxbEntityMappingsImpl bindingRoot = jaxb(

hibernate-core/src/main/java/org/hibernate/boot/jaxb/internal/stax/LocalXmlResourceResolver.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public Object resolveEntity(String publicID, String systemID, String baseURI, St
3737
log.tracef( "In resolveEntity(%s, %s, %s, %s)", publicID, systemID, baseURI, namespace );
3838

3939
if ( namespace != null ) {
40-
log.debugf( "Interpreting namespace : %s", namespace );
40+
log.tracef( "Interpreting namespace: %s", namespace );
4141
if ( MappingXsdSupport.latestDescriptor().getNamespaceUri().matches( namespace ) ) {
4242
return openUrlStream( MappingXsdSupport.latestDescriptor() );
4343
}
@@ -84,7 +84,7 @@ else if ( ConfigXsdSupport.cfgXsd().getNamespaceUri().matches( namespace ) ) {
8484
}
8585

8686
if ( publicID != null || systemID != null ) {
87-
log.debugf( "Checking public/system identifiers `%s`/`%s` as DTD references", publicID, systemID );
87+
log.tracef( "Checking public/system identifiers `%s`/`%s` as DTD references", publicID, systemID );
8888

8989
if ( MAPPING_DTD.matches( publicID, systemID ) ) {
9090
return openUrlStream( MAPPING_DTD.localSchemaUrl );
@@ -116,15 +116,15 @@ else if ( ConfigXsdSupport.cfgXsd().getNamespaceUri().matches( namespace ) ) {
116116
if ( systemID != null ) {
117117
// technically, "classpath://..." identifiers should only be declared as SYSTEM identifiers
118118
if ( systemID.startsWith( CLASSPATH_EXTENSION_URL_BASE ) ) {
119-
log.debugf( "Recognized `classpath:` identifier; attempting to resolve on classpath [%s]", systemID );
119+
log.tracef( "Recognized `classpath:` identifier; attempting to resolve on classpath [%s]", systemID );
120120
final String path = systemID.substring( CLASSPATH_EXTENSION_URL_BASE.length() );
121121
// todo : for this to truly work consistently, we need access to ClassLoaderService
122122
final InputStream stream = resolveInLocalNamespace( path );
123123
if ( stream == null ) {
124-
log.debugf( "Unable to resolve [%s] on classpath", systemID );
124+
log.tracef( "Unable to resolve [%s] on classpath", systemID );
125125
}
126126
else {
127-
log.debugf( "Resolved [%s] on classpath", systemID );
127+
log.tracef( "Resolved [%s] on classpath", systemID );
128128
}
129129
return stream;
130130
}

hibernate-core/src/main/java/org/hibernate/boot/model/convert/internal/AttributeConverterManager.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ public void addRegistration(RegisteredConversion conversion, BootstrapContext co
112112
// see if we have a matching entry in `attributeConverterDescriptorsByClass`.
113113
// if so, remove it. The conversion being registered will always take precedence
114114
if ( attributeConverterDescriptorsByClass != null ) {
115-
final ConverterDescriptor<?,?> removed =
116-
attributeConverterDescriptorsByClass.remove( conversion.getConverterType() );
115+
final var removed = attributeConverterDescriptorsByClass.remove( conversion.getConverterType() );
117116
if ( removed != null && log.isDebugEnabled() ) {
118117
log.debugf( "Removed potentially auto-applicable converter `%s` due to @ConverterRegistration",
119118
removed.getAttributeConverterClass().getName() );
@@ -228,8 +227,8 @@ private List<ConverterDescriptor<?,?>> getMatches(
228227
ConverterDescriptor<?,?>> matcher) {
229228
final List<ConverterDescriptor<?,?>> matches = new ArrayList<>();
230229
for ( ConverterDescriptor<?,?> descriptor : converterDescriptors() ) {
231-
if ( log.isDebugEnabled() ) {
232-
log.debugf(
230+
if ( log.isTraceEnabled() ) {
231+
log.tracef(
233232
"Checking auto-apply AttributeConverter [%s] (domain-type=%s) for match against %s : %s.%s (type=%s)",
234233
descriptor.getAttributeConverterClass().getName(),
235234
descriptor.getDomainValueResolvedType().getSignature(),

hibernate-core/src/main/java/org/hibernate/boot/model/internal/AnnotatedColumn.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ public AnnotatedColumn() {
240240

241241
public void bind() {
242242
if ( isNotEmpty( formulaString ) ) {
243-
if ( LOG.isDebugEnabled() ) {
244-
LOG.debug( "Binding formula: " + formulaString );
243+
if ( LOG.isTraceEnabled() ) {
244+
LOG.trace( "Binding formula: " + formulaString );
245245
}
246246
formula = new Formula();
247247
formula.setFormula( formulaString );
@@ -275,7 +275,7 @@ public void bind() {
275275
mappingColumn.setGeneratedAs( generatedAs );
276276
}
277277
if ( LOG.isDebugEnabled() ) {
278-
LOG.debug( "Binding column: " + logicalColumnName );
278+
LOG.trace( "Binding column: " + logicalColumnName );
279279
}
280280
}
281281
}
@@ -773,8 +773,8 @@ private static jakarta.persistence.Column[] overrideColumns(
773773
+ " '@AttributeOverride's but the overridden property has " + overriddenCols.length
774774
+ " columns (every column must have exactly one '@AttributeOverride')" );
775775
}
776-
if ( LOG.isDebugEnabled() ) {
777-
LOG.debug( "Column mapping overridden for property: " + inferredData.getPropertyName() );
776+
if ( LOG.isTraceEnabled() ) {
777+
LOG.trace( "Column mapping overridden for property: " + inferredData.getPropertyName() );
778778
}
779779
return isEmpty( overriddenCols ) ? null : overriddenCols;
780780
}

0 commit comments

Comments
 (0)