java.lang.Object
net.i2p.util.LogLimit
Defines the log limit for a particular set of logs.
Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionbooleanCompare by root name.intgetLimit()Priority limit applied to matching logs.Root name matched by this limit.inthashCode()Hash code derived from the root name.booleanWhether the log matches this limit, by name or class hierarchy.voidsetLimit(int limit) Configure the priority limit.
Constructor Details
LogLimit
Binds a minimum priority level to every log under the given root name.- Parameters:
name- the root log name this override applies to, matched by class hierarchylimit- the minimum priority level, fromLog.toLevelString(int), that logs under this root name will emit
Method Details
getRootName
getLimit
public int getLimit()Priority limit applied to matching logs.- Returns:
- the minimum priority level that logs under the root name emit
setLimit
public void setLimit(int limit) Configure the priority limit.- Parameters:
limit- the minimum priority level that logs under this root name emit
matches
Whether the log matches this limit, by name or class hierarchy.- Parameters:
log- the log to test, whose class name is compared against the root name- Returns:
- true if this limit applies to that log, false if the name is absent or is a different log entirely
hashCode
equals