org.zodiac.plugin.extension.log.SpringBootLogExtension Maven / Gradle / Ivy
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
}
}