org.apache.log4j.Appender.clearFilters()方法的使用及代码示例

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

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

Appender.clearFilters介绍

[英]Clear the list of filters by removing all the filters in it.
[中]通过删除其中的所有筛选器来清除筛选器列表。

代码示例

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

public void clearFilters()
{
  m_other.clearFilters();
}

代码示例来源:origin: org.terracotta/terracotta-l1-ee

@Override
public void clearFilters() {
 delegate().clearFilters();
}

代码示例来源:origin: org.terracotta/terracotta-ee

@Override
public void clearFilters() {
 delegate().clearFilters();
}

代码示例来源:origin: org.terracotta/terracotta-l1

@Override
public void clearFilters() {
 delegate().clearFilters();
}

代码示例来源:origin: com.jdroidtools/jdroid-java-webapp-core

private synchronized void consolidateEventsAndForward(String loggerName) {
  
  // TODO Add support to multiple appenders
  Appender downstreamAppender = (Appender)appenders.getAllAppenders().nextElement();
  
  List<LoggingEvent> existingEvents = cachedEvents.remove(loggerName);
  if (CollectionUtils.isNotEmpty(existingEvents)) {
    LoggingEvent eventToSendDownstream;
    if (existingEvents.size() == 1) {
      eventToSendDownstream = existingEvents.get(0);
    } else {
      eventToSendDownstream = consolidatedEvent(existingEvents, downstreamAppender.getLayout());
    }
    // To deliver the consolidated event to the downstream appender, we temporarily
    // remove and then reinstate the DenyAllFilter
    downstreamAppender.clearFilters();
    downstreamAppender.doAppend(eventToSendDownstream);
    downstreamAppender.addFilter(new DenyAllFilter());
  }
}

代码示例来源:origin: BiglySoftware/BiglyBT

con.clearFilters();
}else{

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.junit4

private static void removeFilter(final Appender appender, final Filter filter) {
 Filter _filter = appender.getFilter();
 boolean _equals = Objects.equal(_filter, filter);
 if (_equals) {
  appender.clearFilters();
  Filter _next = filter.getNext();
  appender.addFilter(_next);
 } else {
  for (Filter current = appender.getFilter(); (!Objects.equal(current, null)); current = current.getNext()) {
   Filter _next_1 = current.getNext();
   boolean _equals_1 = Objects.equal(_next_1, filter);
   if (_equals_1) {
    Filter _next_2 = filter.getNext();
    current.setNext(_next_2);
    return;
   }
  }
 }
}

相关文章