org.apache.log4j.lf5.viewer.categoryexplorer
public class: CategoryExplorerLogRecordFilter [javadoc |
source]
java.lang.Object
org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerLogRecordFilter
All Implemented Interfaces:
LogRecordFilter
An implementation of LogRecordFilter based on a CategoryExplorerModel
| Field Summary |
|---|
| protected CategoryExplorerModel | _model | |
| Method from org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerLogRecordFilter Summary: |
|---|
|
passes, reset, resetAllNodes |
| Method from org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerLogRecordFilter Detail: |
public boolean passes(LogRecord record) {
CategoryPath path = new CategoryPath(record.getCategory());
return _model.isCategoryPathActive(path);
}
|
public void reset() {
resetAllNodes();
}
Resets the counters for the contained CategoryNodes to zero. |
protected void resetAllNodes() {
Enumeration nodes = _model.getRootCategoryNode().depthFirstEnumeration();
CategoryNode current;
while (nodes.hasMoreElements()) {
current = (CategoryNode) nodes.nextElement();
current.resetNumberOfContainedRecords();
_model.nodeChanged(current);
}
}
|