com.jcabi.log.Logger.isDebugEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(246)

本文整理了Java中com.jcabi.log.Logger.isDebugEnabled()方法的一些代码示例,展示了Logger.isDebugEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isDebugEnabled()方法的具体详情如下:
包路径:com.jcabi.log.Logger
类名称:Logger
方法名:isDebugEnabled

Logger.isDebugEnabled介绍

[英]Validates whether DEBUG priority level is enabled for this particular logger.
[中]验证是否为此特定记录器启用调试优先级。

代码示例

代码示例来源:origin: com.jcabi/jcabi-log

/**
 * Protocol one message, with {@code DEBUG} priority level.
 * @param source The source of the logging operation
 * @param msg The text message to be logged, with meta-tags
 * @param args List of arguments
 */
public static void debug(
  final Object source,
  final String msg, final Object... args
) {
  if (Logger.isDebugEnabled(source)) {
    Logger.debugForced(source, msg, args);
  }
}

代码示例来源:origin: jcabi/jcabi-log

/**
 * Protocol one message, with {@code DEBUG} priority level.
 * @param source The source of the logging operation
 * @param msg The text message to be logged, with meta-tags
 * @param args List of arguments
 */
public static void debug(
  final Object source,
  final String msg, final Object... args
) {
  if (Logger.isDebugEnabled(source)) {
    Logger.debugForced(source, msg, args);
  }
}

代码示例来源:origin: com.jcabi/jcabi-log

/**
 * Log one message, with {@code DEBUG} priority level.
 * @param source The source of the logging operation
 * @param msg The text message to be logged, with meta-tags
 * @param args List of {@link Supplier} arguments. Objects are going
 *  to be extracted from them and used for log message interpolation
 */
public static void debug(
  final Object source, final String msg, final Supplier<?>... args) {
  if (Logger.isDebugEnabled(source)) {
    Logger.debugForced(source, msg, SupplierLogger.supplied(args));
  }
}

代码示例来源:origin: jcabi/jcabi-log

/**
 * Log one message, with {@code DEBUG} priority level.
 * @param source The source of the logging operation
 * @param msg The text message to be logged, with meta-tags
 * @param args List of {@link Supplier} arguments. Objects are going
 *  to be extracted from them and used for log message interpolation
 */
public static void debug(
  final Object source, final String msg, final Supplier<?>... args) {
  if (Logger.isDebugEnabled(source)) {
    Logger.debugForced(source, msg, SupplierLogger.supplied(args));
  }
}

代码示例来源:origin: jcabi/jcabi-aspects

/**
   * Log level is enabled?
   *
   * @param level Level of logging
   * @param log Destination log
   * @return TRUE if enabled
   */
  public static boolean enabled(final int level, final Object log) {
    boolean enabled;
    if (level == Loggable.TRACE) {
      enabled = Logger.isTraceEnabled(log);
    } else if (level == Loggable.DEBUG) {
      enabled = Logger.isDebugEnabled(log);
    } else if (level == Loggable.INFO) {
      enabled = Logger.isInfoEnabled(log);
    } else if (level == Loggable.WARN) {
      enabled = Logger.isWarnEnabled(log);
    } else {
      enabled = true;
    }
    return enabled;
  }
}

代码示例来源:origin: com.jcabi/jcabi-aspects

/**
   * Log level is enabled?
   *
   * @param level Level of logging
   * @param log Destination log
   * @return TRUE if enabled
   */
  public static boolean enabled(final int level, final Object log) {
    boolean enabled;
    if (level == Loggable.TRACE) {
      enabled = Logger.isTraceEnabled(log);
    } else if (level == Loggable.DEBUG) {
      enabled = Logger.isDebugEnabled(log);
    } else if (level == Loggable.INFO) {
      enabled = Logger.isInfoEnabled(log);
    } else if (level == Loggable.WARN) {
      enabled = Logger.isWarnEnabled(log);
    } else {
      enabled = true;
    }
    return enabled;
  }
}

相关文章