LevelMatchFilter ClassApache log4net™ SDK Documentation
This is a very simple filter based on Level matching.
Inheritance Hierarchy

SystemObject
  log4net.FilterFilterSkeleton
    log4net.FilterLevelMatchFilter

Namespace: log4net.Filter
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

public class LevelMatchFilter : FilterSkeleton

The LevelMatchFilter type exposes the following members.

Constructors

  NameDescription
Public methodLevelMatchFilter
Default constructor
Top
Properties

  NameDescription
Public propertyAcceptOnMatch
Accept when matching LevelToMatch
Public propertyLevelToMatch
The Level that the filter will match
Public propertyNext
Property to get and set the next filter
(Inherited from FilterSkeleton.)
Top
Methods

  NameDescription
Public methodActivateOptions
Initialize the filter with the options set
(Inherited from FilterSkeleton.)
Public methodDecide
Tests if the Level of the logging event matches that of the filter
(Overrides FilterSkeletonDecide(LoggingEvent).)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Remarks

The filter admits two options LevelToMatch and AcceptOnMatch. If there is an exact match between the value of the LevelToMatch option and the Level of the LoggingEvent, then the Decide(LoggingEvent) method returns Accept in case the AcceptOnMatch option value is set to true, if it is false then Deny is returned. If the Level does not match then the result will be Neutral.

See Also

Reference