本文整理了Java中ch.qos.logback.core.Appender.addWarn()
方法的一些代码示例,展示了Appender.addWarn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Appender.addWarn()
方法的具体详情如下:
包路径:ch.qos.logback.core.Appender
类名称:Appender
方法名:addWarn
暂无
代码示例来源:origin: caskdata/cdap
@Override
public void addWarn(String msg, Throwable ex) {
delegate.addWarn(msg, ex);
}
代码示例来源:origin: caskdata/cdap
@Override
public void addWarn(String msg) {
delegate.addWarn(msg);
}
代码示例来源:origin: co.cask.cdap/cdap-watchdog
@Override
public void addWarn(String msg, Throwable ex) {
delegate.addWarn(msg, ex);
}
代码示例来源:origin: co.cask.cdap/cdap-watchdog
@Override
public void addWarn(String msg) {
delegate.addWarn(msg);
}
代码示例来源:origin: co.wrisk.logback/logback-ext-core
public static void awaitLatch(Appender<?> appender, CountDownLatch latch, long waitMillis) {
if (latch.getCount() > 0) {
try {
boolean completed = latch.await(waitMillis, TimeUnit.MILLISECONDS);
if (!completed) {
appender.addWarn(format("Appender '%s' did not complete sending event in %d milliseconds, " +
"the event might have been lost",
appender.getName(), waitMillis));
}
} catch (InterruptedException ex) {
appender.addWarn(format("Appender '%s' was interrupted, " +
"a logging event might have been lost or shutdown was initiated",
appender.getName()));
Thread.currentThread().interrupt();
}
}
}
代码示例来源:origin: co.wrisk.logback/logback-ext-core
public static void shutdown(Appender<?> appender, ExecutorService executor, long waitMillis) {
executor.shutdown();
boolean completed = awaitTermination(appender, executor, waitMillis);
if (!completed) {
appender.addWarn(format("Executor for %s did not shut down in %d milliseconds, " +
"logging events might have been discarded",
appender.getName(), waitMillis));
}
}
内容来源于网络,如有侵权,请联系作者删除!