com.bitfactoryinc.logging
Class LogEntryCategoryFilter
java.lang.Object
|
+--com.bitfactoryinc.logging.LogEntryFilter
|
+--com.bitfactoryinc.logging.LogEntryCategoryFilter
- public class LogEntryCategoryFilter
- extends LogEntryFilter
Instances filter LogEntries based on their categories.
By default, this is an "allow" filter, meaning that the specified categories
contained herein pass through the filter. If allow is set to false, then all
categories that are NOT contained herein will pass through.
|
Field Summary |
private boolean |
allow
|
private java.util.Collection |
categories
|
|
Method Summary |
void |
addCategory(java.lang.Object aCategory)
|
protected boolean |
canPass(LogEntry aLogEntry)
Concrete subclasses should override this method, returning true
if aLogEntry "passes" the filter (i.e. |
protected java.util.Collection |
getCategories()
|
boolean |
isAllow()
|
void |
removeCategory(java.lang.Object aCategory)
|
void |
setAllow(boolean newAllow)
|
protected void |
setCategories(java.util.Collection newCategories)
|
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
categories
private java.util.Collection categories
allow
private boolean allow
LogEntryCategoryFilter
public LogEntryCategoryFilter()
LogEntryCategoryFilter
public LogEntryCategoryFilter(boolean allowFlag)
addCategory
public void addCategory(java.lang.Object aCategory)
canPass
protected boolean canPass(LogEntry aLogEntry)
- Description copied from class: LogEntryFilter
- Concrete subclasses should override this method, returning true
if aLogEntry "passes" the filter (i.e. aLogEntry should be logged).
- Overrides:
- canPass in class LogEntryFilter
getCategories
protected java.util.Collection getCategories()
isAllow
public boolean isAllow()
removeCategory
public void removeCategory(java.lang.Object aCategory)
setAllow
public void setAllow(boolean newAllow)
setCategories
protected void setCategories(java.util.Collection newCategories)