Improve Log Levels

Issue gh-402
This commit is contained in:
Andrei Ivanov
2016-10-21 18:40:29 +03:00
committed by Rob Winch
parent b7c855082b
commit c885997cd7

View File

@@ -299,9 +299,11 @@ class DirContextPooledObjectFactory extends BaseKeyedPooledObjectFactory<Object,
boolean nonTransientEncountered = false;
for (Class<? extends Throwable> clazz : nonTransientExceptions) {
if(clazz.isAssignableFrom(targetExceptionClass)) {
logger.info(
String.format("An %s - explicitly configured to be a non-transient exception - encountered; eagerly invalidating the target context.",
if (logger.isDebugEnabled()) {
logger.debug(
String.format("A %s - explicitly configured to be a non-transient exception - encountered; eagerly invalidating the target context.",
targetExceptionClass));
}
nonTransientEncountered = true;
break;
}
@@ -311,7 +313,7 @@ class DirContextPooledObjectFactory extends BaseKeyedPooledObjectFactory<Object,
hasFailed = true;
} else {
if (logger.isDebugEnabled()) {
logger.debug(String.format("An %s - not explicitly configured to be a non-transient exception - encountered; ignoring.",
logger.debug(String.format("A %s - not explicitly configured to be a non-transient exception - encountered; ignoring.",
targetExceptionClass));
}
}