StringMatchFilter Decide Method | Apache log4net™ SDK Documentation

Check if this filter should allow the event to be logged

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

C#
VB
C++
F#
Copy

    public override FilterDecision Decide(
    	LoggingEvent loggingEvent
    )

    Public Overrides Function Decide (
    	loggingEvent As LoggingEvent
    ) As FilterDecision

    public:
    virtual FilterDecision Decide(
    	LoggingEvent^ loggingEvent
    ) override

    abstract Decide :
            loggingEvent : LoggingEvent -> FilterDecision
    override Decide :
            loggingEvent : LoggingEvent -> FilterDecision

#### Parameters

loggingEvent
  Type: log4net.Core
  LoggingEvent
  the event being logged

#### Return Value

Type: FilterDecision
see remarks

#### Implements

IFilter
Decide(LoggingEvent)
Remarks

The rendered message is matched against the StringToMatch. If the StringToMatch occurs as a substring within the message then a match will have occurred. If no match occurs this function will return Neutral allowing other filters to check the event. If a match occurs then the value of AcceptOnMatch is checked. If it is true then Accept is returned otherwise Deny is returned.

See Also

#### Reference

StringMatchFilter Class
log4net.Filter Namespace