org.apache.log4j.spi.HierarchyEventListener Java Examples

The following examples show how to use org.apache.log4j.spi.HierarchyEventListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Hierarchy.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public
void addHierarchyEventListener(HierarchyEventListener listener) {
  if(listeners.contains(listener)) {
    LogLog.warn("Ignoring attempt to add an existent listener.");
  } else {
    listeners.addElement(listener);
  }
}
 
Example #2
Source File: Category.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
   *  LoggerRepository forgot the fireRemoveAppenderEvent method,
   *     if using the stock Hierarchy implementation, then call its fireRemove.
   *     Custom repositories can implement HierarchyEventListener if they
   *     want remove notifications.
  * @param appender appender, may be null.
  */
private void fireRemoveAppenderEvent(final Appender appender) {
    if (appender != null) {
      if (repository instanceof Hierarchy) {
        ((Hierarchy) repository).fireRemoveAppenderEvent(this, appender);
      } else if (repository instanceof HierarchyEventListener) {
          ((HierarchyEventListener) repository).removeAppenderEvent(this, appender);
      }
    }
}
 
Example #3
Source File: LoggerUtil.java    From Bats with Apache License 2.0 4 votes vote down vote up
@Override
public void addHierarchyEventListener(HierarchyEventListener listener)
{
  loggerRepository.addHierarchyEventListener(listener);
}
 
Example #4
Source File: TestLog4Json.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public void addHierarchyEventListener(HierarchyEventListener listener) {
}
 
Example #5
Source File: TestLog4Json.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public void addHierarchyEventListener(HierarchyEventListener listener) {
}
 
Example #6
Source File: LoggerUtil.java    From attic-apex-core with Apache License 2.0 4 votes vote down vote up
@Override
public void addHierarchyEventListener(HierarchyEventListener listener)
{
  loggerRepository.addHierarchyEventListener(listener);
}
 
Example #7
Source File: LogManager.java    From logging-log4j2 with Apache License 2.0 2 votes vote down vote up
@Override
public void addHierarchyEventListener(final HierarchyEventListener listener) {

}
 
Example #8
Source File: LogManager.java    From logging-log4j2 with Apache License 2.0 2 votes vote down vote up
@Override
public void addHierarchyEventListener(final HierarchyEventListener listener) {

}