Package org.apache.log4j.varia
Class DenyAllFilter
java.lang.Object
org.apache.log4j.spi.Filter
org.apache.log4j.varia.DenyAllFilter
- All Implemented Interfaces:
OptionHandler
This filter drops all logging events.
You can add this filter to the end of a filter chain to switch from the default "accept all unless instructed otherwise" filtering behaviour to a "deny all unless instructed otherwise" behaviour.
- Since:
- 0.9.0
- Author:
- Ceki Gülcü
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
decide
(LoggingEvent event) Always returns the integer constantFilter.DENY
regardless of theLoggingEvent
parameter.String[]
Deprecated.We now use JavaBeans introspection to configure components.void
Deprecated.Use the setter method for the option directly instead of the genericsetOption
method.Methods inherited from class org.apache.log4j.spi.Filter
activateOptions, getNext, setNext
-
Constructor Details
-
DenyAllFilter
public DenyAllFilter()
-
-
Method Details
-
getOptionStrings
Deprecated.We now use JavaBeans introspection to configure components. Options strings are no longer needed.Returnsnull
as there are no options. -
setOption
Deprecated.Use the setter method for the option directly instead of the genericsetOption
method.No options to set. -
decide
Always returns the integer constantFilter.DENY
regardless of theLoggingEvent
parameter.- Specified by:
decide
in classFilter
- Parameters:
event
- The LoggingEvent to filter.- Returns:
- Always returns
Filter.DENY
.
-