Table of Contents

Class DenyAllFilter

Namespace
log4net.Filter
Assembly
log4net.dll

This filter drops all LoggingEvent.

public sealed class DenyAllFilter : FilterSkeleton, IFilter, IOptionHandler
Inheritance
DenyAllFilter
Implements
Inherited Members

Remarks

You can add this filter to the end of a filter chain to switch from the default "accept all unless instructed otherwise" filtering behavior to a "deny all unless instructed otherwise" behavior.

Constructors

DenyAllFilter()

Default constructor

public DenyAllFilter()

Methods

Decide(LoggingEvent)

Always returns the integer constant Deny

public override FilterDecision Decide(LoggingEvent loggingEvent)

Parameters

loggingEvent LoggingEvent

the LoggingEvent to filter

Returns

FilterDecision

Always returns Deny

Remarks

Ignores the event being logged and just returns Deny. This can be used to change the default filter chain behavior from Accept to Deny. This filter should only be used as the last filter in the chain as any further filters will be ignored!