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

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

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

Appender.getFilter介绍

[英]Returns the head Filter. The Filters are organized in a linked list and so all Filters on this Appender are available through the result.
[中]返回头过滤器。过滤器组织在一个链表中,因此此附加器上的所有过滤器都可通过结果使用。

代码示例

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

public Filter getFilter()
{
  return m_other.getFilter();
}

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

@Override
public Filter getFilter() {
 return delegate().getFilter();
}

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

@Override
public Filter getFilter() {
 return delegate().getFilter();
}

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

@Override
public Filter getFilter() {
 return delegate().getFilter();
}

代码示例来源:origin: org.orbisgis/orbisgis-core

/**
 * Set Application running in a verbose mode
 * @param debugMode The new mode
 */
public void setDebugMode(boolean debugMode) {
  this.debugMode = debugMode;
  setFilterLevel((LevelRangeFilter)Logger.getRootLogger().getAppender(CONSOLE_LOGGER).getFilter(),debugMode);
}
/**

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

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

@Override
protected void doPublish(final ExtLogRecord record) {
  final LoggingEvent event = new LoggingEvent(record, JBossLogManagerFacade.getLogger(logger));
  final List<Appender> appenders = Appenders.getAppenderList(logger);
  for (Appender appender : appenders) {
    if (new JBossFilterWrapper(appender.getFilter(), true).isLoggable(record)) {
      appender.doAppend(event);
    }
  }
}

相关文章