Package org.apache.log4j.bridge
Class FilterWrapper
- java.lang.Object
-
- org.apache.log4j.spi.Filter
-
- org.apache.log4j.bridge.FilterWrapper
-
public class FilterWrapper extends Filter
This acts as a container for Log4j 2 Filters to be attached to Log4j 1 components. However, the Log4j 2 Filters will always be called directly so this class just acts as a container.
-
-
Constructor Summary
Constructors Constructor Description FilterWrapper(Filter filter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Filter
adapt(Filter filter)
Adapts a Log4j 2.x filter into a Log4j 1.x filter.int
decide(LoggingEvent event)
This method is never called.Filter
getFilter()
-
Methods inherited from class org.apache.log4j.spi.Filter
activateOptions, getNext, setNext
-
-
-
-
Field Detail
-
filter
private final Filter filter
-
-
Constructor Detail
-
FilterWrapper
public FilterWrapper(Filter filter)
-
-
Method Detail
-
adapt
public static Filter adapt(Filter filter)
Adapts a Log4j 2.x filter into a Log4j 1.x filter. Applying this method to the result ofFilterAdapter.adapt(Filter)
should return the original Log4j 1.x filter.- Parameters:
filter
- a Log4j 2.x filter- Returns:
- a Log4j 1.x filter or
null
if the parameter isnull
-
getFilter
public Filter getFilter()
-
decide
public int decide(LoggingEvent event)
This method is never called.
-
-