org.apache.juli.logging.ch.qos.logback.core.model.processor.AllowModelFilter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tomcat85-slf4j-logback Show documentation
Show all versions of tomcat85-slf4j-logback Show documentation
Tomcat85 Slf4j Logback Integration
package org.apache.juli.logging.ch.qos.logback.core.model.processor;
import org.apache.juli.logging.ch.qos.logback.core.model.Model;
import org.apache.juli.logging.ch.qos.logback.core.spi.FilterReply;
public class AllowModelFilter implements ModelFilter {
final Class allowedModelType;
AllowModelFilter(Class allowedType) {
this.allowedModelType = allowedType;
}
@Override
public FilterReply decide(Model model) {
if (model.getClass() == allowedModelType) {
return FilterReply.ACCEPT;
}
return FilterReply.NEUTRAL;
}
}