Expose SpringBootCondition's logger

See gh-10000
This commit is contained in:
Oleg Zhurakousky 2017-08-11 10:28:32 -04:00 committed by Stephane Nicoll
parent 914b3588b0
commit 58826644d1
1 changed files with 9 additions and 1 deletions

View File

@ -18,7 +18,7 @@ package org.springframework.boot.autoconfigure.condition;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
@ -158,4 +158,12 @@ public abstract class SpringBootCondition implements Condition {
return condition.matches(context, metadata);
}
/**
* Returns the instance of {@link Logger} used by this
* instance of the condition.
* @return instance of {@link Logger}
*/
protected final Log getLogger() {
return this.logger;
}
}