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


Java Level.ERROR_INT属性代码示例

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


在下文中一共展示了Level.ERROR_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.ERROR_INT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。