LoggerMatchFilter Class | Apache log4net™ SDK Documentation

Simple filter to match a string in the event's logger name.
Inheritance Hierarchy

System
Object
log4net.Filter
FilterSkeleton
log4net.Filter
LoggerMatchFilter

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

C#
VB
C++
F#
Copy

    public class LoggerMatchFilter : FilterSkeleton

    Public Class LoggerMatchFilter
    	Inherits FilterSkeleton

    public ref class LoggerMatchFilter : public FilterSkeleton

    type LoggerMatchFilter =
        class
            inherit FilterSkeleton
        end

The LoggerMatchFilter type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| LoggerMatchFilter | Default constructor

Top
Properties

| Name | Description
--- | --- | ---
| AcceptOnMatch | Accept when matching LoggerToMatch
| LoggerToMatch | The LoggerName that the filter will match
| Next | Property to get and set the next filter (Inherited from FilterSkeleton.)

Top
Methods

| Name | Description
--- | --- | ---
| ActivateOptions | Initialize the filter with the options set (Inherited from FilterSkeleton.)
| Decide | Check if this filter should allow the event to be logged (Overrides FilterSkeleton Decide(LoggingEvent).)
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
| ToString | Returns a String that represents the current Object. (Inherited from Object.)

Top
Remarks

The works very similar to the LevelMatchFilter. It admits two options LoggerToMatch and AcceptOnMatch. If the LoggerName of the LoggingEvent starts with the value of the LoggerToMatch option, 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.

See Also

#### Reference

log4net.Filter Namespace