HHH-16601 log second-level cache RegionFactory initiation

This commit is contained in:
Gavin 2023-05-20 01:34:47 +02:00 committed by Gavin King
parent 6d0c166414
commit f38de6217b
2 changed files with 14 additions and 1 deletions

View File

@ -46,7 +46,12 @@ public class RegionFactoryInitiator implements StandardServiceInitiator<RegionFa
public RegionFactory initiateService(Map<String, Object> configurationValues, ServiceRegistryImplementor registry) {
final RegionFactory regionFactory = resolveRegionFactory( configurationValues, registry );
LOG.debugf( "Cache region factory : %s", regionFactory.getClass().getName() );
if ( regionFactory instanceof NoCachingRegionFactory ) {
LOG.noRegionFactory();
}
else {
LOG.regionFactory( regionFactory.getClass().getTypeName() );
}
return regionFactory;
}

View File

@ -98,6 +98,14 @@ public interface CoreMessageLogger extends BasicLogger {
@Message(value = "Cache provider: %s", id = 24)
void cacheProvider(String name);
@LogMessage(level = INFO)
@Message(value = "Second-level cache region factory [%s]", id = 25)
void regionFactory(String name);
@LogMessage(level = INFO)
@Message(value = "Second-level cache disabled", id = 26)
void noRegionFactory();
@LogMessage(level = WARN)
@Message(value = "Calling joinTransaction() on a non JTA EntityManager", id = 27)
void callingJoinTransactionOnNonJtaEntityManager();