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.LogLevel
s.Arguments: - factory (Microsoft.Extensions.Logging.ILoggerFactory) – The extension method argument.
- settings (Microsoft.Extensions.Logging.EventLog.EventLogSettings) – The
Microsoft.Extensions.Logging.EventLog.EventLogSettings
.
Return type: 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.LogLevel
s of minLevel or higher.Arguments: - factory (Microsoft.Extensions.Logging.ILoggerFactory) – The extension method argument.
- minLevel (Microsoft.Extensions.Logging.LogLevel) – The minimum
Microsoft.Extensions.Logging.LogLevel
to be logged
Return type: public static ILoggerFactory AddEventLog(this ILoggerFactory factory, LogLevel minLevel)
-