EventLogSettings Class

Settings for Microsoft.Extensions.Logging.EventLog.EventLogLogger.

Namespace
Microsoft.Extensions.Logging.EventLog
Assemblies
  • Microsoft.Extensions.Logging.EventLog

Syntax

public class EventLogSettings
class Microsoft.Extensions.Logging.EventLog.EventLogSettings

Properties

Microsoft.Extensions.Logging.EventLog.EventLogSettings.EventLog

For unit testing purposes only.

Return type:Microsoft.Extensions.Logging.EventLog.Internal.IEventLog
public IEventLog EventLog { get; set; }
Microsoft.Extensions.Logging.EventLog.EventLogSettings.Filter

The function used to filter events based on the log level.

Return type:System.Func<System.String>
public Func<string, LogLevel, bool> Filter { get; set; }
Microsoft.Extensions.Logging.EventLog.EventLogSettings.LogName

Name of the event log. If <code>null</code> or not specified, “Application” is the default.

Return type:System.String
public string LogName { get; set; }
Microsoft.Extensions.Logging.EventLog.EventLogSettings.MachineName

Name of the machine having the event log. If <code>null</code> or not specified, local machine is the default.

Return type:System.String
public string MachineName { get; set; }
Microsoft.Extensions.Logging.EventLog.EventLogSettings.SourceName

Name of the event log source. If <code>null</code> or not specified, “Application” is the default.

Return type:System.String
public string SourceName { get; set; }