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

x33g5p2x  于2022-01-15 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(161)

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

Appender.getContext介绍

暂无

代码示例

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

protected Appender<E> wrapAsync(Appender<E> appender, AsyncAppenderFactory<E> asyncAppenderFactory) {
  return wrapAsync(appender, asyncAppenderFactory, appender.getContext());
}

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

@Override
public Context getContext() {
 return delegate.getContext();
}

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

@Override
public Context getContext() {
 return delegate.getContext();
}

代码示例来源:origin: com.nhl.bootique.logback/bootique-logback

protected Appender<ILoggingEvent> asAsync(Appender<ILoggingEvent> appender) {
  return asAsync(appender, appender.getContext());
}

代码示例来源:origin: io.dropwizard/dropwizard-logging

protected Appender<E> wrapAsync(Appender<E> appender, AsyncAppenderFactory<E> asyncAppenderFactory) {
  return wrapAsync(appender, asyncAppenderFactory, appender.getContext());
}

代码示例来源:origin: com.plausiblelabs.warwizard/warwizard-core

public AsyncAppender(Appender<ILoggingEvent> delegate, int batchSize) {
  this.delegate = delegate;
  this.queue = Queues.newLinkedBlockingQueue();
  this.batch = Lists.newArrayListWithCapacity(batchSize);
  this.batchSize = batchSize;
  this.dispatcher = THREAD_FACTORY.newThread(this);
  setContext(delegate.getContext());
}

代码示例来源:origin: Multibit-Legacy/multibit-hd

private AsyncAppender(Appender<ILoggingEvent> delegate) {
 this.delegate = delegate;
 this.queue = Queues.newLinkedBlockingQueue();
 this.batch = Lists.newArrayListWithCapacity(BATCH_SIZE);
 this.dispatcher = THREAD_FACTORY.newThread(this);
 setContext(delegate.getContext());
}

代码示例来源:origin: net.logstash.logback/logstash-logback-encoder

private void startDelegateAppenders() {
  for (Iterator<Appender<Event>> appenderIter = appenders.iteratorForAppenders(); appenderIter.hasNext();) {
    Appender<Event> appender = appenderIter.next();
    if (appender.getContext() == null) {
      appender.setContext(getContext());
    }
    if (!appender.isStarted()) {
      appender.start();
    }
  }
}

相关文章