Class WindowsEventLogProvider
Log messages to the windows event log. It is highly recommended this is used only for warning level messages and above, and can only be used when running with adequate permissions to use the EventLog, such as by an Administrator or service account.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class WindowsEventLogProvider : LogProvider
Constructors
WindowsEventLogProvider()
Initializes a new instance of the WindowsEventLogProvider class.
Declaration
public WindowsEventLogProvider()
WindowsEventLogProvider(LogLevel)
Initializes a new instance of the WindowsEventLogProvider class.
Declaration
public WindowsEventLogProvider(LogLevel level)
Parameters
| Type | Name | Description |
|---|---|---|
| LogLevel | level | The log level. |
WindowsEventLogProvider(LogLevel, String)
Initializes a new instance of the WindowsEventLogProvider class.
Declaration
public WindowsEventLogProvider(LogLevel level, string source)
Parameters
| Type | Name | Description |
|---|---|---|
| LogLevel | level | The log level. |
| System.String | source | The source. |
Properties
Source
Gets or sets the event source.
Declaration
public string Source { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
DoLog(LogEvent)
Logs a message at the specified log level.
Declaration
protected override void DoLog(LogEvent logEvent)
Parameters
| Type | Name | Description |
|---|---|---|
| LogEvent | logEvent | The log event details. |