All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ch.qos.logback.solon.SolonConfigurator Maven / Gradle / Ivy

There is a newer version: 3.0.5-M3
Show newest version
package ch.qos.logback.solon;

import ch.qos.logback.classic.joran.JoranConfigurator;
import ch.qos.logback.core.joran.spi.ElementSelector;
import ch.qos.logback.core.joran.spi.RuleStore;
import ch.qos.logback.core.model.processor.DefaultProcessor;

/**
 * @author noear
 * @since 1.6
 * @since 2.3
 */
public class SolonConfigurator extends JoranConfigurator {
    @Override
    protected void addModelHandlerAssociations(DefaultProcessor defaultProcessor) {
        defaultProcessor.addHandler(SolonPropertyModel.class,
                (handlerContext, handlerMic) -> new SolonPropertyModelHandler(this.context));

        super.addModelHandlerAssociations(defaultProcessor);
    }

    @Override
    public void addElementSelectorAndActionAssociations(RuleStore ruleStore) {
        super.addElementSelectorAndActionAssociations(ruleStore);
        ruleStore.addRule(new ElementSelector("configuration/solonProperty"),  SolonPropertyAction::new);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy