org.apache.log4j.spi.Filter.setNext()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(204)

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

Filter.setNext介绍

[英]Set the next filter pointer.
[中]设置下一个过滤器指针。

代码示例

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

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源:origin: apache/log4j

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源:origin: org.apache.logging.log4j/log4j-1.2-api

@Override
public void addFilter(Filter newFilter) {
  if(headFilter == null) {
    headFilter = tailFilter = newFilter;
  } else {
    tailFilter.setNext(newFilter);
    tailFilter = newFilter;
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.log4j

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源:origin: apache-log4j/log4j

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源:origin: org.apache.log4j/com.springsource.org.apache.log4j

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源:origin: org.jboss.logmanager/log4j-jboss-logmanager

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源:origin: org.apache.activemq/activemq-all

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源:origin: org.apache/log4j

/**
  Add a filter to end of the filter list.
  @since 0.9.0
 */
public
void addFilter(Filter newFilter) {
 if(headFilter == null) {
  headFilter = tailFilter = newFilter;
 } else {
  tailFilter.setNext(newFilter);
  tailFilter = newFilter;    
 }
}

代码示例来源: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;
   }
  }
 }
}

相关文章