Skip to content

Commit 5882664

Browse files
olegzsnicoll
authored andcommitted
Expose SpringBootCondition's logger
See spring-projectsgh-10000
1 parent 914b358 commit 5882664

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import org.apache.commons.logging.Log;
2020
import org.apache.commons.logging.LogFactory;
21-
21+
import org.slf4j.Logger;
2222
import org.springframework.context.annotation.Condition;
2323
import org.springframework.context.annotation.ConditionContext;
2424
import org.springframework.core.type.AnnotatedTypeMetadata;
@@ -158,4 +158,12 @@ protected final boolean matches(ConditionContext context,
158158
return condition.matches(context, metadata);
159159
}
160160

161+
/**
162+
* Returns the instance of {@link Logger} used by this
163+
* instance of the condition.
164+
* @return instance of {@link Logger}
165+
*/
166+
protected final Log getLogger() {
167+
return this.logger;
168+
}
161169
}

0 commit comments

Comments
 (0)