當前位置: 首頁>>代碼示例>>Java>>正文


Java Level.WARN_INT屬性代碼示例

本文整理匯總了Java中ch.qos.logback.classic.Level.WARN_INT屬性的典型用法代碼示例。如果您正苦於以下問題:Java Level.WARN_INT屬性的具體用法?Java Level.WARN_INT怎麽用?Java Level.WARN_INT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在ch.qos.logback.classic.Level的用法示例。


在下文中一共展示了Level.WARN_INT屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: message

public void message(String msg, Throwable t) {
	switch(level) {
	case Level.TRACE_INT: {
		slf4jLogger.trace(marker, msg, t);
		break;
	}
	case Level.DEBUG_INT: {
		slf4jLogger.debug(marker, msg, t);
		break;
	}
	case Level.INFO_INT: {
		slf4jLogger.info(marker, msg, t);
		break;
	}
	case Level.WARN_INT: {
		slf4jLogger.warn(marker, msg, t);
		break;
	}
	case Level.ERROR_INT: {
		slf4jLogger.error(marker, msg, t);
		break;
	}
	}
}
 
開發者ID:skjolber,項目名稱:json-log-domain,代碼行數:24,代碼來源:AbstractDomainLogStatement.java

示例2: decide

@Override
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) {
    // cannot use logger.isEnabledFor(level), as it would cause a StackOverflowError by calling this filter again!
    if(level.isGreaterOrEqual(logger.getEffectiveLevel()) && format != null) {
        switch (level.toInt()) {
            case Level.ERROR_INT:
                errorCounter.increment();
                break;
            case Level.WARN_INT:
                warnCounter.increment();
                break;
            case Level.INFO_INT:
                infoCounter.increment();
                break;
            case Level.DEBUG_INT:
                debugCounter.increment();
                break;
            case Level.TRACE_INT:
                traceCounter.increment();
                break;
        }
    }

    return FilterReply.NEUTRAL;
}
 
開發者ID:micrometer-metrics,項目名稱:micrometer,代碼行數:25,代碼來源:LogbackMetrics.java

示例3: append

@Override
protected void append(ILoggingEvent event) {
    switch (event.getLevel().toInt()) {
    case Level.TRACE_INT:
        traceLabel.inc();
        break;
    case Level.DEBUG_INT:
        debugLabel.inc();
        break;
    case Level.INFO_INT:
        infoLabel.inc();
        break;
    case Level.WARN_INT:
        warnLabel.inc();
        break;
    case Level.ERROR_INT:
        errorLabel.inc();
        break;
    default:
        break;
    }
}
 
開發者ID:Skatteetaten,項目名稱:aurora-prometheus,代碼行數:22,代碼來源:LogbackMetricsAppender.java

示例4: writeTo

@Override
public void writeTo(JsonGenerator generator, ILoggingEvent event) throws IOException {
    String level;
    switch (event.getLevel().toInt()) {
        case Level.ERROR_INT:
            level = "error";
            break;
        case Level.WARN_INT:
            level = "warning";
            break;
        case Level.INFO_INT:
            level = "info";
            break;
        case Level.DEBUG_INT:
            level = "debug";
            break;
        case Level.TRACE_INT:
            level = "trace";
            break;
        case Level.ALL_INT:
            level = "all";
            break;
        case Level.OFF_INT:
            level = "off";
            break;
        default:
            level = "???";
    }
    JsonWritingUtils.writeStringField(
            generator, getFieldName(), level);
}
 
開發者ID:Sixt,項目名稱:ja-micro,代碼行數:31,代碼來源:CustomLogLevelJsonProvider.java

示例5: translate

private static LogOutput.Level translate(Level level) {
  switch (level.toInt()) {
    case Level.ERROR_INT:
      return LogOutput.Level.ERROR;
    case Level.WARN_INT:
      return LogOutput.Level.WARN;
    case Level.INFO_INT:
      return LogOutput.Level.INFO;
    case Level.TRACE_INT:
      return LogOutput.Level.TRACE;
    case Level.DEBUG_INT:
    default:
      return LogOutput.Level.DEBUG;
  }
}
 
開發者ID:instalint-org,項目名稱:instalint,代碼行數:15,代碼來源:LogCallbackAppender.java

示例6: toGelfMessageLevel

private GelfMessageLevel toGelfMessageLevel(Level level) {
    switch (level.toInt()) {
        case Level.ERROR_INT:
            return GelfMessageLevel.ERROR;
        case Level.WARN_INT:
            return GelfMessageLevel.WARNING;
        case Level.DEBUG_INT:
            return GelfMessageLevel.DEBUG;
        default:
            return GelfMessageLevel.INFO;
    }
}
 
開發者ID:tochkak,項目名稱:play-graylog2,代碼行數:12,代碼來源:GelfClientAppender.java


注:本文中的ch.qos.logback.classic.Level.WARN_INT屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。