當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。