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

org.zodiac.plugin.extension.log.SpringBootLogExtension Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.plugin.extension.log;

import org.springframework.context.ApplicationContext;
import org.zodiac.plugin.extension.AbstractPluginExtension;
import org.zodiac.plugin.factory.process.pipe.PluginPipeProcessorExtend;
import org.zodiac.sdk.toolkit.util.collection.CollUtil;

import java.util.List;

/**
 * SpringBoot日志扩展。
 */
public class SpringBootLogExtension extends AbstractPluginExtension {

    private static final String KEY = "SpringBootLogExtension";

    private final Type type;

    public SpringBootLogExtension(Type type) {
        this.type = type;
    }

    @Override
    public String key() {
        return KEY;
    }

    @Override
    public List getPluginPipeProcessor(ApplicationContext mainApplicationContext) {
        List pipeProcessorExtends = CollUtil.list();
        pipeProcessorExtends.add(new PluginLogConfigProcessor(type));
        return pipeProcessorExtends;
    }

    public enum Type {
        /**
         * 集成log4j
         **/
        LOG4J,

        /**
         * 集成 logback
         **/
        LOGBACK
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy