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


Java Level.TRACE属性代码示例

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


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

示例1: convert

private static Level convert(final LogLevel logLevel) {
    switch (logLevel) {
        case FATAL:
            return Level.FATAL;
        case ERROR:
            return Level.ERROR;
        case WARN:
            return Level.WARN;
        case INFO:
            return Level.INFO;
        case DEBUG:
            return Level.DEBUG;
        case TRACE:
            return Level.TRACE;
        case OFF:
            return Level.OFF;
        default:
            return Level.toLevel(logLevel.name());
    }
}
 
开发者ID:apache,项目名称:logging-log4j-boot,代码行数:20,代码来源:Log4jLoggingSystem.java

示例2: log4jLevelToLogWriterLevel

public static int log4jLevelToLogWriterLevel(final Level log4jLevel) {
  if (log4jLevel == Level.FATAL) {
    return InternalLogWriter.SEVERE_LEVEL;
  } else if (log4jLevel == Level.ERROR) {
    return InternalLogWriter.ERROR_LEVEL;
  } else if (log4jLevel == Level.WARN) {
    return InternalLogWriter.WARNING_LEVEL;
  } else if (log4jLevel == Level.INFO) {
    return InternalLogWriter.INFO_LEVEL;
  } else if (log4jLevel == Level.DEBUG) {
    return InternalLogWriter.FINE_LEVEL;
  } else if (log4jLevel == Level.TRACE) {
    return InternalLogWriter.FINEST_LEVEL;
  } else if (log4jLevel == Level.ALL) {
    return InternalLogWriter.ALL_LEVEL;
  } else if (log4jLevel == Level.OFF) {
    return InternalLogWriter.NONE_LEVEL;
  }

  throw new IllegalArgumentException("Unknown Log4J level [" + log4jLevel + "].");
}
 
开发者ID:ampool,项目名称:monarch,代码行数:21,代码来源:LogWriterLogger.java

示例3: getLogWriterLevel

@Override
public int getLogWriterLevel() {
  final Level log4jLevel = this.logWrapper.getLevel();

  if (log4jLevel == Level.OFF) {
    return InternalLogWriter.NONE_LEVEL;
  } else if (log4jLevel == Level.FATAL) {
    return InternalLogWriter.SEVERE_LEVEL;
  } else if (log4jLevel == Level.ERROR) {
    return InternalLogWriter.ERROR_LEVEL;
  } else if (log4jLevel == Level.WARN) {
    return InternalLogWriter.WARNING_LEVEL;
  } else if (log4jLevel == Level.INFO) {
    return InternalLogWriter.INFO_LEVEL;
  } else if (log4jLevel == Level.DEBUG) {
    return InternalLogWriter.FINE_LEVEL;
  } else if (log4jLevel == Level.TRACE) {
    return InternalLogWriter.FINER_LEVEL;
  } else if (log4jLevel == Level.ALL) {
    return InternalLogWriter.ALL_LEVEL;
  }

  throw new IllegalStateException(
      "Level " + log4jLevel + " could not be mapped to LogWriter level.");
}
 
开发者ID:ampool,项目名称:monarch,代码行数:25,代码来源:LogWriterLogger.java

示例4: toLevel

protected Level toLevel(InternalLogLevel level) {
    switch (level) {
        case INFO:
            return Level.INFO;
        case DEBUG:
            return Level.DEBUG;
        case WARN:
            return Level.WARN;
        case ERROR:
            return Level.ERROR;
        case TRACE:
            return Level.TRACE;
        default:
            throw new Error();
    }
}
 
开发者ID:mayabot,项目名称:mynlp,代码行数:16,代码来源:Log4J2Logger.java

示例5: append

@Override
public void append(LogEvent event) {
    final String formattedMessage = event.getMessage().getFormattedMessage();
    if (event.getLevel() == Level.TRACE && event.getMarker().getName().contains("[index][1] ")) {
        if (event.getLoggerName().endsWith(".IW") &&
            formattedMessage.contains("IW: apply all deletes during flush")) {
            sawIndexWriterMessage = true;
        }
        if (event.getLoggerName().endsWith(".IFD")) {
            sawIndexWriterIFDMessage = true;
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:InternalEngineTests.java

示例6: append

@Override
public void append(LogEvent event) {
    String message = event.getMessage().getFormattedMessage();
    if (event.getLevel() == Level.TRACE && event.getLoggerName().endsWith("lucene.iw")) {
    }
    if (event.getLevel() == Level.INFO
        && message.contains("updating [index.merge.scheduler.max_thread_count] from [10000] to [1]")) {
        sawUpdateMaxThreadCount = true;
    }
    if (event.getLevel() == Level.INFO
        && message.contains("updating [index.merge.scheduler.auto_throttle] from [true] to [false]")) {
        sawUpdateAutoThrottle = true;
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:MergeSchedulerSettingsTests.java

示例7: apply

@Override
public void apply(Pointer voidPtr1, int levelID, Pointer formatPtr, Pointer args) {
    Level level;
    switch(levelID) { // SEE FFmpeg libavutil/log.h
        case AV_LOG_QUIET:
        case AV_LOG_TRACE:
            level = Level.TRACE; break;
        case AV_LOG_PANIC:
        case AV_LOG_FATAL:
            level = Level.FATAL; break;
        case AV_LOG_ERROR:
            level = Level.ERROR; break;
        case AV_LOG_WARNING:
            level = Level.WARN; break;
        case AV_LOG_INFO:
            level = Level.INFO; break;
        case AV_LOG_VERBOSE:
        case AV_LOG_DEBUG:
            level = Level.DEBUG; break;
        default:
            level = Level.DEBUG;
    }

    Memory line = new Memory(128L);
    Avutil55Library.INSTANCE.av_log_format_line(voidPtr1, levelID, formatPtr, args, line.share(0), 128, prefix);
    String message = String.format(line.getString(0), args).trim();
    logger.log(level, message);
}
 
开发者ID:cqjjjzr,项目名称:Laplacian,代码行数:28,代码来源:FFmpegLogHelper.java

示例8: logWriterLeveltoLog4jLevel

/************************************************************
 * Methods to support backwards compatibility between levels.
 ************************************************************/

public static Level logWriterLeveltoLog4jLevel(final int logWriterLevel) {
  switch (logWriterLevel) {
    case InternalLogWriter.SEVERE_LEVEL:
      return Level.FATAL;
    case InternalLogWriter.ERROR_LEVEL:
      return Level.ERROR;
    case InternalLogWriter.WARNING_LEVEL:
      return Level.WARN;
    case InternalLogWriter.CONFIG_LEVEL:
      return Level.INFO;
    case InternalLogWriter.INFO_LEVEL:
      return Level.INFO;
    case InternalLogWriter.FINE_LEVEL:
      return Level.DEBUG;
    case InternalLogWriter.FINER_LEVEL:
      return Level.DEBUG;
    case InternalLogWriter.FINEST_LEVEL:
      return Level.TRACE;
    case InternalLogWriter.ALL_LEVEL:
      return Level.ALL;
    case InternalLogWriter.NONE_LEVEL:
      return Level.OFF;
  }

  throw new IllegalArgumentException("Unknown LogWriter level [" + logWriterLevel + "].");
}
 
开发者ID:ampool,项目名称:monarch,代码行数:30,代码来源:LogWriterLogger.java

示例9: logWriterNametoLog4jLevel

public static Level logWriterNametoLog4jLevel(String levelName) {
  if ("all".equalsIgnoreCase(levelName)) {
    return Level.ALL;
  }
  if ("finest".equalsIgnoreCase(levelName)) {
    return Level.TRACE;
  }
  if ("finer".equalsIgnoreCase(levelName)) {
    return Level.DEBUG;
  }
  if ("fine".equalsIgnoreCase(levelName)) {
    return Level.DEBUG;
  }
  if ("config".equalsIgnoreCase(levelName)) {
    return Level.INFO;
  }
  if ("info".equalsIgnoreCase(levelName)) {
    return Level.INFO;
  }
  if ("warning".equalsIgnoreCase(levelName)) {
    return Level.WARN;
  }
  if ("error".equalsIgnoreCase(levelName)) {
    return Level.ERROR;
  }
  if ("severe".equalsIgnoreCase(levelName)) {
    return Level.FATAL;
  }
  if ("none".equalsIgnoreCase(levelName)) {
    return Level.OFF;
  }

  throw new IllegalArgumentException("Unknown LogWriter level [" + levelName + "].");
}
 
开发者ID:ampool,项目名称:monarch,代码行数:34,代码来源:LogWriterLogger.java


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