public void addHierarchyEventListener(HierarchyEventListener listener) { if(listeners.contains(listener)) { LogLog.warn("Ignoring attempt to add an existent listener."); } else { listeners.addElement(listener); } }
/** * 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); } } }
@Override public void addHierarchyEventListener(HierarchyEventListener listener) { }
@Override public void addHierarchyEventListener(HierarchyEventListener listener) { loggerRepository.addHierarchyEventListener(listener); }
@Override public void addHierarchyEventListener(final HierarchyEventListener listener) { }