Table of Contents

Class LogEnabledFilter

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging.Filters
Assembly
Microsoft.Practices.EnterpriseLibrary.Logging.dll

Represents a Boolean on/off filter.

public class LogEnabledFilter : LogFilter, ILogFilter
Inheritance
LogEnabledFilter
Implements
Inherited Members

Constructors

LogEnabledFilter(string, bool)

Initializes an instance of LogEnabledFilter.

public LogEnabledFilter(string name, bool enabled)

Parameters

name string

The name of the filter.

enabled bool

True if the filter allows messages, false otherwise.

Properties

Enabled

Gets or set the Boolean flag for the filter.

public bool Enabled { get; set; }

Property Value

bool

Methods

Filter(LogEntry)

Tests to see if a message meets the criteria to be processed.

public override bool Filter(LogEntry log)

Parameters

log LogEntry

Log entry to test.

Returns

bool

true if the message passes through the filter and should be logged, false otherwise.