EventLoggerFactoryExtensions Class

Extension methods for the Microsoft.Extensions.Logging.ILoggerFactory class.

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

Syntax

public class EventLoggerFactoryExtensions
class Microsoft.Extensions.Logging.EventLoggerFactoryExtensions

Methods

AddEventLog(Microsoft.Extensions.Logging.ILoggerFactory)

Adds an event logger that is enabled for Microsoft.Extensions.Logging.LogLevel.Information or higher.

Arguments:factory (Microsoft.Extensions.Logging.ILoggerFactory) – The extension method argument.
Return type:Microsoft.Extensions.Logging.ILoggerFactory
public static ILoggerFactory AddEventLog(this ILoggerFactory factory)
AddEventLog(Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Extensions.Logging.EventLog.EventLogSettings)

Adds an event logger. Use <em>settings</em> to enable logging for specific Microsoft.Extensions.Logging.LogLevels.

Arguments:
Return type:

Microsoft.Extensions.Logging.ILoggerFactory

public static ILoggerFactory AddEventLog(this ILoggerFactory factory, EventLogSettings settings)
AddEventLog(Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Extensions.Logging.LogLevel)

Adds an event logger that is enabled for Microsoft.Extensions.Logging.LogLevels of minLevel or higher.

Arguments:
Return type:

Microsoft.Extensions.Logging.ILoggerFactory

public static ILoggerFactory AddEventLog(this ILoggerFactory factory, LogLevel minLevel)