StringMatchFilter Class | Apache log4net™ SDK Documentation

Simple filter to match a string in the rendered message
Inheritance Hierarchy

System
Object
log4net.Filter
FilterSkeleton
log4net.Filter
StringMatchFilter
log4net.Filter
PropertyFilter

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

C#
VB
C++
F#
Copy

    public class StringMatchFilter : FilterSkeleton

    Public Class StringMatchFilter
    	Inherits FilterSkeleton

    public ref class StringMatchFilter : public FilterSkeleton

    type StringMatchFilter =
        class
            inherit FilterSkeleton
        end

The StringMatchFilter type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| StringMatchFilter | Default constructor

Top
Properties

| Name | Description
--- | --- | ---
| AcceptOnMatch | Accept when matching StringToMatch or RegexToMatch
| Next | Property to get and set the next filter (Inherited from FilterSkeleton.)
| RegexToMatch | Sets the regular expression to match
| StringToMatch | Sets the static string to match

Top
Methods

| Name | Description
--- | --- | ---
| ActivateOptions | Initialize and precompile the Regex if required (Overrides FilterSkeleton ActivateOptions .)
| 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
Fields

| Name | Description
--- | --- | ---
| m_acceptOnMatch | Flag to indicate the behavior when we have a match
| m_regexToMatch | A regex object to match (generated from m_stringRegexToMatch)
| m_stringRegexToMatch | A string regex to match
| m_stringToMatch | The string to substring match against the message

Top
Remarks

Simple filter to match a string in the rendered message

See Also

#### Reference

log4net.Filter Namespace