ch.qos.logback.core.Appender.addError()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(31)

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

Appender.addError介绍

暂无

代码示例

代码示例来源:origin: caskdata/cdap

@Override
public void addError(String msg, Throwable ex) {
 delegate.addError(msg, ex);
}

代码示例来源:origin: co.cask.cdap/cdap-watchdog

@Override
public void addError(String msg) {
 delegate.addError(msg);
}

代码示例来源:origin: caskdata/cdap

@Override
public void addError(String msg) {
 delegate.addError(msg);
}

代码示例来源:origin: co.cask.cdap/cdap-watchdog

@Override
public void addError(String msg, Throwable ex) {
 delegate.addError(msg, ex);
}

代码示例来源:origin: co.wrisk.logback/logback-ext-core

private static boolean awaitTermination(Appender<?> appender, ExecutorService executor, long waitMillis) {
  long started = System.currentTimeMillis();
  try {
    return executor.awaitTermination(waitMillis, TimeUnit.MILLISECONDS);
  } catch (InterruptedException ie1) {
    // the worker loop is stopped by interrupt, but the remaining queue should still be handled
    long waited = System.currentTimeMillis() - started;
    if (waited < waitMillis) {
      try {
        return executor.awaitTermination(waitMillis - waited, TimeUnit.MILLISECONDS);
      } catch (InterruptedException ie2) {
        appender.addError(format("Shut down of executor for %s was interrupted",
                     appender.getName()));
      }
    }
    Thread.currentThread().interrupt();
  }
  return false;
}

相关文章