EventLoggerFactoryExtensions.AddEventLog Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddEventLog(ILoggerFactory) |
Obsolete.
Adds an event logger that is enabled for LogLevel.Information or higher. |
AddEventLog(ILoggingBuilder) |
Adds an event logger named 'EventLog' to the factory. |
AddEventLog(ILoggerFactory, EventLogSettings) |
Obsolete.
Adds an event logger. Use |
AddEventLog(ILoggerFactory, LogLevel) |
Obsolete.
Adds an event logger that is enabled for LogLevels of minLevel or higher. |
AddEventLog(ILoggingBuilder, EventLogSettings) |
Adds an event logger. Use |
AddEventLog(ILoggingBuilder, Action<EventLogSettings>) |
Adds an event logger. Use |
AddEventLog(ILoggerFactory)
Caution
This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).
Adds an event logger that is enabled for LogLevel.Information or higher.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggerFactory ^ AddEventLog(Microsoft::Extensions::Logging::ILoggerFactory ^ factory);
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Extensions.Logging.ILoggerFactory
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")>]
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory) As ILoggerFactory
Parameters
- factory
- ILoggerFactory
The extension method argument.
Returns
- Attributes
Applies to
AddEventLog(ILoggingBuilder)
Adds an event logger named 'EventLog' to the factory.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddEventLog(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog (this Microsoft.Extensions.Logging.ILoggingBuilder builder);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddEventLog (builder As ILoggingBuilder) As ILoggingBuilder
Parameters
- builder
- ILoggingBuilder
The extension method argument.
Returns
The ILoggingBuilder so that additional calls can be chained.
Applies to
AddEventLog(ILoggerFactory, EventLogSettings)
Caution
This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).
Adds an event logger. Use settings
to enable logging for specific LogLevels.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggerFactory ^ AddEventLog(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Microsoft::Extensions::Logging::EventLog::EventLogSettings ^ settings);
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.EventLog.EventLogSettings settings);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.EventLog.EventLogSettings settings);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.EventLog.EventLogSettings -> Microsoft.Extensions.Logging.ILoggerFactory
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")>]
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.EventLog.EventLogSettings -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory, settings As EventLogSettings) As ILoggerFactory
Parameters
- factory
- ILoggerFactory
The extension method argument.
- settings
- EventLogSettings
The EventLogSettings.
Returns
- Attributes
Applies to
AddEventLog(ILoggerFactory, LogLevel)
Caution
This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).
Adds an event logger that is enabled for LogLevels of minLevel or higher.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggerFactory ^ AddEventLog(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Microsoft::Extensions::Logging::LogLevel minLevel);
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.LogLevel minLevel);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.LogLevel minLevel);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.ILoggerFactory
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")>]
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory, minLevel As LogLevel) As ILoggerFactory
Parameters
- factory
- ILoggerFactory
The extension method argument.
Returns
- Attributes
Applies to
AddEventLog(ILoggingBuilder, EventLogSettings)
Adds an event logger. Use settings
to enable logging for specific LogLevels.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddEventLog(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Microsoft::Extensions::Logging::EventLog::EventLogSettings ^ settings);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Logging.EventLog.EventLogSettings settings);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggingBuilder * Microsoft.Extensions.Logging.EventLog.EventLogSettings -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddEventLog (builder As ILoggingBuilder, settings As EventLogSettings) As ILoggingBuilder
Parameters
- builder
- ILoggingBuilder
The extension method argument.
- settings
- EventLogSettings
The EventLogSettings.
Returns
The ILoggingBuilder so that additional calls can be chained.
Applies to
AddEventLog(ILoggingBuilder, Action<EventLogSettings>)
Adds an event logger. Use configure
to enable logging for specific LogLevels.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddEventLog(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Action<Microsoft::Extensions::Logging::EventLog::EventLogSettings ^> ^ configure);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Action<Microsoft.Extensions.Logging.EventLog.EventLogSettings> configure);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggingBuilder * Action<Microsoft.Extensions.Logging.EventLog.EventLogSettings> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddEventLog (builder As ILoggingBuilder, configure As Action(Of EventLogSettings)) As ILoggingBuilder
Parameters
- builder
- ILoggingBuilder
The extension method argument.
- configure
- Action<EventLogSettings>
A delegate to configure the EventLogSettings.
Returns
The ILoggingBuilder so that additional calls can be chained.