EventLoggerFactoryExtensions.AddEventLog Method
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.
AddEventLog(ILoggingBuilder) |
Adds an event logger named 'EventLog' to the factory. |
AddEventLog(ILoggingBuilder, EventLogSettings) |
Adds an event logger. Use |
AddEventLog(ILoggingBuilder, Action<EventLogSettings>) |
Adds an event logger. Use |
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
.NET 9 (package-provided) og andre versjoner
Produkt | Versjoner |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Adds an event logger. Use settings
to enable logging for specific log levels.
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
.NET 9 (package-provided) og andre versjoner
Produkt | Versjoner |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Adds an event logger. Use configure
to enable logging for specific log levels.
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.
Applies to
.NET 9 (package-provided) og andre versjoner
Produkt | Versjoner |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET-tilbakemelding
.NET er et åpen kilde-prosjekt. Velg en kobling for å gi tilbakemelding: