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
stringThe name of the filter.
enabled
boolTrue 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
Methods
Filter(LogEntry)
Tests to see if a message meets the criteria to be processed.
public override bool Filter(LogEntry log)
Parameters
log
LogEntryLog entry to test.
Returns
- bool
true if the message passes through the filter and should be logged, false otherwise.