Search in sources :

Example 1 with ElementSelector

use of ch.qos.logback.core.joran.spi.ElementSelector in project spring-boot by spring-projects.

the class SpringBootJoranConfigurator method addInstanceRules.

@Override
public void addInstanceRules(RuleStore rs) {
    super.addInstanceRules(rs);
    Environment environment = this.initializationContext.getEnvironment();
    rs.addRule(new ElementSelector("configuration/springProperty"), new SpringPropertyAction(environment));
    rs.addRule(new ElementSelector("*/springProfile"), new SpringProfileAction(this.initializationContext.getEnvironment()));
    rs.addRule(new ElementSelector("*/springProfile/*"), new NOPAction());
}
Also used : NOPAction(ch.qos.logback.core.joran.action.NOPAction) Environment(org.springframework.core.env.Environment) ElementSelector(ch.qos.logback.core.joran.spi.ElementSelector)

Aggregations

NOPAction (ch.qos.logback.core.joran.action.NOPAction)1 ElementSelector (ch.qos.logback.core.joran.spi.ElementSelector)1 Environment (org.springframework.core.env.Environment)1