public class

DenyAllFilter

extends Filter
java.lang.Object
   ↳ org.apache.log4j.spi.Filter
     ↳ org.apache.log4j.varia.DenyAllFilter

Class Overview

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.

Summary

[Expand]
Inherited Constants
From class org.apache.log4j.spi.Filter
[Expand]
Inherited Fields
From class org.apache.log4j.spi.Filter
Public Constructors
DenyAllFilter()
Public Methods
int decide(LoggingEvent event)
Always returns the integer constant DENY regardless of the LoggingEvent parameter.
String[] getOptionStrings()
This method is deprecated. We now use JavaBeans introspection to configure components. Options strings are no longer needed.
void setOption(String key, String value)
This method is deprecated. Use the setter method for the option directly instead of the generic setOption method.
[Expand]
Inherited Methods
From class org.apache.log4j.spi.Filter
From class java.lang.Object
From interface org.apache.log4j.spi.OptionHandler

Public Constructors

public DenyAllFilter ()

Public Methods

public int decide (LoggingEvent event)

Always returns the integer constant DENY regardless of the LoggingEvent parameter.

Parameters
event The LoggingEvent to filter.
Returns
  • Always returns DENY.

public String[] getOptionStrings ()

This method is deprecated.
We now use JavaBeans introspection to configure components. Options strings are no longer needed.

Returns null as there are no options.

public void setOption (String key, String value)

This method is deprecated.
Use the setter method for the option directly instead of the generic setOption method.

No options to set.