org.osgl.logging.Logger.isWarnEnabled()方法的使用及代码示例

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

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

Logger.isWarnEnabled介绍

暂无

代码示例

代码示例来源:origin: org.actframework/act-morphia

@Override
public boolean isWarningEnabled() {
  return logger.isWarnEnabled();
}

代码示例来源:origin: actframework/actframework

@Command(name = "act.log.level.show", help = "Show log level")
public String showLogLevel(@Required("specify LOGGER name") String name) {
  Logger logger = LogManager.get(name);
  if (logger.isTraceEnabled()) {
    return "trace";
  } else if (logger.isDebugEnabled()) {
    return "debug";
  } else if (logger.isInfoEnabled()) {
    return "info";
  } else if (logger.isWarnEnabled()) {
    return "warn";
  } else if (logger.isErrorEnabled()) {
    return "error";
  }
  return "fatal";
}

代码示例来源:origin: org.actframework/act

@Command(name = "act.log.level.show", help = "Show log level")
public String showLogLevel(@Required("specify LOGGER name") String name) {
  Logger logger = LogManager.get(name);
  if (logger.isTraceEnabled()) {
    return "trace";
  } else if (logger.isDebugEnabled()) {
    return "debug";
  } else if (logger.isInfoEnabled()) {
    return "info";
  } else if (logger.isWarnEnabled()) {
    return "warn";
  } else if (logger.isErrorEnabled()) {
    return "error";
  }
  return "fatal";
}

相关文章