HHH-5843 Adding a log.isTraceEnabled call before the actual log call

Not really related to the HQL parsing, but it is also a small logging performance change
This commit is contained in:
Hardy Ferentschik 2011-01-19 10:05:37 +01:00
parent bfa3a0e32b
commit 3cfb1904e5
1 changed files with 10 additions and 8 deletions

View File

@ -78,6 +78,7 @@ public abstract class BasicBinder<J> implements ValueBinder<J> {
st.setNull( index, sqlDescriptor.getSqlType() );
}
else {
if ( log.isTraceEnabled() ) {
log.trace(
String.format(
BIND_MSG_TEMPLATE,
@ -86,6 +87,7 @@ public abstract class BasicBinder<J> implements ValueBinder<J> {
getJavaDescriptor().extractLoggableRepresentation( value )
)
);
}
doBind( st, value, index, options );
}
}