HHH-16090 BasicResultAssembler logging optimisations

This commit is contained in:
Sanne Grinovero 2023-01-24 16:20:51 +00:00 committed by Sanne Grinovero
parent 033eeb7241
commit 0b5cb6c649
3 changed files with 13 additions and 7 deletions

View File

@ -255,11 +255,13 @@ public class BasicValuedCollectionPart
boolean selected,
String resultVariable,
DomainResultCreationState creationState) {
ResultsLogger.RESULTS_LOGGER.debugf(
"Generating Fetch for collection-part : `%s` -> `%s`",
collectionDescriptor.getRole(),
nature.getName()
);
if ( ResultsLogger.DEBUG_ENABLED ) {
ResultsLogger.RESULTS_LOGGER.debugf(
"Generating Fetch for collection-part : `%s` -> `%s`",
collectionDescriptor.getRole(),
nature.getName()
);
}
NavigablePath parentNavigablePath = fetchablePath.getParent();
if ( parentNavigablePath instanceof EntityIdentifierNavigablePath ) {

View File

@ -118,7 +118,9 @@ public class DomainResultCreationStateImpl
}
public void disallowPositionalSelections() {
ResultsLogger.RESULTS_LOGGER.debugf( "Disallowing positional selections : %s", stateIdentifier );
if ( ResultsLogger.DEBUG_ENABLED ) {
ResultsLogger.RESULTS_LOGGER.debugf( "Disallowing positional selections : %s", stateIdentifier );
}
this.allowPositionalSelections = false;
}

View File

@ -58,7 +58,9 @@ public class BasicResultAssembler<J> implements DomainResultAssembler<J> {
JdbcValuesSourceProcessingOptions options) {
final Object jdbcValue = extractRawValue( rowProcessingState );
ResultsLogger.RESULTS_MESSAGE_LOGGER.debugf( "Extracted JDBC value [%d] - [%s]", valuesArrayPosition, jdbcValue );
if ( ResultsLogger.DEBUG_ENABLED ) {
ResultsLogger.RESULTS_LOGGER.debugf( "Extracted JDBC value [%d] - [%s]", valuesArrayPosition, jdbcValue );
}
if ( valueConverter != null ) {
if ( jdbcValue != null ) {