Package org.jboss.logmanager.filters
Class AnyFilter
- java.lang.Object
-
- org.jboss.logmanager.filters.AnyFilter
-
- All Implemented Interfaces:
java.util.logging.Filter
public final class AnyFilter extends java.lang.Object implements java.util.logging.Filter
A filter consisting of several filters in a chain. If any filter finds the log message to be loggable, the message will be logged and subsequent filters will not be checked. If there are no nested filters, this instance always returnsfalse
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.logging.Filter[]
filters
-
Constructor Summary
Constructors Constructor Description AnyFilter(java.lang.Iterable<java.util.logging.Filter> filters)
Construct a new instance.AnyFilter(java.util.Iterator<java.util.logging.Filter> filters)
Construct a new instance.AnyFilter(java.util.logging.Filter[] filters)
Construct a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLoggable(java.util.logging.LogRecord record)
Determine whether the record is loggable.private static java.util.logging.Filter[]
unroll(java.util.Iterator<java.util.logging.Filter> iter, int cnt)
-
-
-
Constructor Detail
-
AnyFilter
public AnyFilter(java.util.logging.Filter[] filters)
Construct a new instance.- Parameters:
filters
- the constituent filters
-
AnyFilter
public AnyFilter(java.lang.Iterable<java.util.logging.Filter> filters)
Construct a new instance.- Parameters:
filters
- the constituent filters
-
AnyFilter
public AnyFilter(java.util.Iterator<java.util.logging.Filter> filters)
Construct a new instance.- Parameters:
filters
- the constituent filters
-
-
Method Detail
-
unroll
private static java.util.logging.Filter[] unroll(java.util.Iterator<java.util.logging.Filter> iter, int cnt)
-
isLoggable
public boolean isLoggable(java.util.logging.LogRecord record)
Determine whether the record is loggable.- Specified by:
isLoggable
in interfacejava.util.logging.Filter
- Parameters:
record
- the log record- Returns:
true
if any of the constituent filters returntrue
-
-