当前位置: 首页>>代码示例>>Java>>正文


Java FilterReply.ACCEPT属性代码示例

本文整理汇总了Java中ch.qos.logback.core.spi.FilterReply.ACCEPT属性的典型用法代码示例。如果您正苦于以下问题:Java FilterReply.ACCEPT属性的具体用法?Java FilterReply.ACCEPT怎么用?Java FilterReply.ACCEPT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在ch.qos.logback.core.spi.FilterReply的用法示例。


在下文中一共展示了FilterReply.ACCEPT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: decide

@Override
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t)
{
    //System.out.println("** Being called "+logger+"**"+level+"**"+marker);
    ConfigValueTuple override = loggerOverrides.get(logger);
    if(override != null)
    {
        Level configLevel = Level.toLevel(override.getLevel());
        if(level.isGreaterOrEqual(configLevel))
            return FilterReply.ACCEPT;
        else
            return FilterReply.DENY;
    }
    else
        return FilterReply.NEUTRAL;
}
 
开发者ID:CptnKirk,项目名称:spring-webmvc-dynamiclogging,代码行数:16,代码来源:DynamicLoggerFilter.java

示例2: decide

@Override
public FilterReply decide(ILoggingEvent event)
{
	int xx = event.getLevel().levelInt;
	int xx1 = Level.ERROR.toInt();  //error:40000, warn:30000, info:20000
	if (xx >= xx1)
	{
		JFrameMain.getInstance().getMsgTextArea().append(event.getFormattedMessage() + System.lineSeparator());
	}
	return FilterReply.ACCEPT;
}
 
开发者ID:tywo45,项目名称:talent-aio,代码行数:11,代码来源:LogbackFilter.java

示例3: decide

@Override
public FilterReply decide(ILoggingEvent event) {
    if (isEclipse) {
        // 只有在eclipse启动时才输出
        return FilterReply.ACCEPT;
    } else {
        return FilterReply.DENY;
    }
}
 
开发者ID:alibaba,项目名称:yugong,代码行数:9,代码来源:ConsoleFilter.java

示例4: getTurboFilterChainDecision

public FilterReply getTurboFilterChainDecision(Marker marker,
                                               KonkerLogger logger,
                                               Level level,
                                               String format,
                                               Object[] params,
                                               Throwable t) {
    int size = this.size();
    if(size == 1) {
        try {
            KonkerTurboFilter filter = this.get(0);
            return filter.decide(marker, logger, level, format, params, t);
        } catch (IndexOutOfBoundsException var13) {
            return FilterReply.NEUTRAL;
        }
    } else {
        Object[] tfa = this.toArray();
        int len = tfa.length;

        for(int i = 0; i < len; ++i) {
            KonkerTurboFilter tf = (KonkerTurboFilter) tfa[i];
            FilterReply r = tf.decide(marker, logger, level, format, params, t);
            if(r == FilterReply.DENY || r == FilterReply.ACCEPT) {
                return r;
            }
        }

        return FilterReply.NEUTRAL;
    }
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:29,代码来源:KonkerTurboFilterList.java

示例5: isDebugEnabled

public boolean isDebugEnabled(Marker marker) {
    FilterReply decision = this.callTurboFilters(marker, Level.DEBUG);
    if(decision == FilterReply.NEUTRAL) {
        return this.effectiveLevelInt <= 10000;
    } else if(decision == FilterReply.DENY) {
        return false;
    } else if(decision == FilterReply.ACCEPT) {
        return true;
    } else {
        throw new IllegalStateException("Unknown FilterReply value: " + decision);
    }
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:12,代码来源:KonkerLogger.java

示例6: isInfoEnabled

public boolean isInfoEnabled(Marker marker) {
    FilterReply decision = this.callTurboFilters(marker, Level.INFO);
    if(decision == FilterReply.NEUTRAL) {
        return this.effectiveLevelInt <= 20000;
    } else if(decision == FilterReply.DENY) {
        return false;
    } else if(decision == FilterReply.ACCEPT) {
        return true;
    } else {
        throw new IllegalStateException("Unknown FilterReply value: " + decision);
    }
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:12,代码来源:KonkerLogger.java

示例7: isTraceEnabled

public boolean isTraceEnabled(Marker marker) {
    FilterReply decision = this.callTurboFilters(marker, Level.TRACE);
    if(decision == FilterReply.NEUTRAL) {
        return this.effectiveLevelInt <= 5000;
    } else if(decision == FilterReply.DENY) {
        return false;
    } else if(decision == FilterReply.ACCEPT) {
        return true;
    } else {
        throw new IllegalStateException("Unknown FilterReply value: " + decision);
    }
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:12,代码来源:KonkerLogger.java

示例8: isErrorEnabled

public boolean isErrorEnabled(Marker marker) {
    FilterReply decision = this.callTurboFilters(marker, Level.ERROR);
    if(decision == FilterReply.NEUTRAL) {
        return this.effectiveLevelInt <= '鱀';
    } else if(decision == FilterReply.DENY) {
        return false;
    } else if(decision == FilterReply.ACCEPT) {
        return true;
    } else {
        throw new IllegalStateException("Unknown FilterReply value: " + decision);
    }
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:12,代码来源:KonkerLogger.java

示例9: isWarnEnabled

public boolean isWarnEnabled(Marker marker) {
    FilterReply decision = this.callTurboFilters(marker, Level.WARN);
    if(decision == FilterReply.NEUTRAL) {
        return this.effectiveLevelInt <= 30000;
    } else if(decision == FilterReply.DENY) {
        return false;
    } else if(decision == FilterReply.ACCEPT) {
        return true;
    } else {
        throw new IllegalStateException("Unknown FilterReply value: " + decision);
    }
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:12,代码来源:KonkerLogger.java

示例10: isEnabledFor

public boolean isEnabledFor(Marker marker, Level level) {
    FilterReply decision = this.callTurboFilters(marker, level);
    if(decision == FilterReply.NEUTRAL) {
        return this.effectiveLevelInt <= level.levelInt;
    } else if(decision == FilterReply.DENY) {
        return false;
    } else if(decision == FilterReply.ACCEPT) {
        return true;
    } else {
        throw new IllegalStateException("Unknown FilterReply value: " + decision);
    }
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:12,代码来源:KonkerLogger.java

示例11: decide

@Override
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) {
    String logLevel = MDC.get(DynamicLogLevelHelper.MDC_DYNAMIC_LOG_LEVEL_KEY);
    if (logLevel == null) {
        return FilterReply.NEUTRAL;
    }
    if (level.isGreaterOrEqual(Level.toLevel(logLevel))) {
        return FilterReply.ACCEPT;
    }
    return FilterReply.DENY;
}
 
开发者ID:SAP,项目名称:cf-java-logging-support,代码行数:11,代码来源:CustomLoggingTurboFilter.java

示例12: setOnMatch

/**
 * @param onMatch action to set on success
 */
public void setOnMatch(String action) {
	if ("NEUTRAL".equals(action)) {
		this.onMatch = FilterReply.NEUTRAL;
	} else if ("ACCEPT".equals(action)) {
		this.onMatch = FilterReply.ACCEPT;
	} else {
		this.onMatch = FilterReply.DENY;
	}
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:12,代码来源:MDCLevelTurboFilter.java

示例13: setOnMismatch

/**
 * @param onMismatch the onMismatch to set on failure
 */
public void setOnMismatch(String action) {
	if ("NEUTRAL".equals(action)) {
		this.onMismatch = FilterReply.NEUTRAL;
	} else if ("ACCEPT".equals(action)) {
		this.onMismatch = FilterReply.ACCEPT;
	} else {
		this.onMismatch = FilterReply.DENY;
	}
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:12,代码来源:MDCLevelTurboFilter.java

示例14: decide

@Override
public FilterReply decide(ILoggingEvent event) {
	if(event.getMessage().contains("TEST"))
		return FilterReply.ACCEPT;
	else 
		return FilterReply.DENY;
}
 
开发者ID:informix-samples,项目名称:DatabaseCompatibilityTest,代码行数:7,代码来源:SummaryFilter.java

示例15: isDebugEnabled

public boolean isDebugEnabled(Marker marker) {
  final FilterReply decision = callTurboFilters(marker, Level.DEBUG);
  if (decision == FilterReply.NEUTRAL) {
    return effectiveLevelInt <= Level.DEBUG_INT;
  } else if (decision == FilterReply.DENY) {
    return false;
  } else if (decision == FilterReply.ACCEPT) {
    return true;
  } else {
    throw new IllegalStateException("Unknown FilterReply value: " + decision);
  }
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:12,代码来源:Logger.java


注:本文中的ch.qos.logback.core.spi.FilterReply.ACCEPT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。