本文整理汇总了Java中org.apache.log4j.spi.HierarchyEventListener类的典型用法代码示例。如果您正苦于以下问题:Java HierarchyEventListener类的具体用法?Java HierarchyEventListener怎么用?Java HierarchyEventListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HierarchyEventListener类属于org.apache.log4j.spi包,在下文中一共展示了HierarchyEventListener类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addHierarchyEventListener
import org.apache.log4j.spi.HierarchyEventListener; //导入依赖的package包/类
public
void addHierarchyEventListener(HierarchyEventListener listener) {
if(listeners.contains(listener)) {
LogLog.warn("Ignoring attempt to add an existent listener.");
} else {
listeners.addElement(listener);
}
}
示例2: fireRemoveAppenderEvent
import org.apache.log4j.spi.HierarchyEventListener; //导入依赖的package包/类
/**
* 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);
}
}
}
示例3: addHierarchyEventListener
import org.apache.log4j.spi.HierarchyEventListener; //导入依赖的package包/类
@Override
public void addHierarchyEventListener(HierarchyEventListener listener) {
}
示例4: addHierarchyEventListener
import org.apache.log4j.spi.HierarchyEventListener; //导入依赖的package包/类
@Override
public void addHierarchyEventListener(HierarchyEventListener listener)
{
loggerRepository.addHierarchyEventListener(listener);
}
示例5: addHierarchyEventListener
import org.apache.log4j.spi.HierarchyEventListener; //导入依赖的package包/类
@Override
public void addHierarchyEventListener(final HierarchyEventListener listener) {
}