Skip to content

Commit 307e8fc

Browse files
missingdaysgregturn
authored andcommitted
Fix debug logging in MergingPersistenceUnitManager.
A String.format token was missing, so `mappingFileName` was printed instead of a `persistenceUnitName`, and `persistenceUnitName` wasn't actually printed at all. See #2526.
1 parent cd27f03 commit 307e8fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ void postProcessPersistenceUnitInfo(MutablePersistenceUnitInfo pui, PersistenceU
8282

8383
for (String mappingFileName : oldPui.getMappingFileNames()) {
8484
if (!pui.getMappingFileNames().contains(mappingFileName)) {
85-
LOG.debug("Adding mapping file to persistence unit {}.", mappingFileName, persistenceUnitName);
85+
if (LOG.isDebugEnabled()) {
86+
LOG.debug(String.format("Adding mapping file %s to persistence unit %s.", mappingFileName, persistenceUnitName));
87+
}
8688
pui.addMappingFileName(mappingFileName);
8789
}
8890
}

0 commit comments

Comments
 (0)