Partager via


TraceSourceFactoryExtensions.AddTraceSource Method

Definition

Overloads

AddTraceSource(ILoggingBuilder, SourceSwitch)

Adds a logger that writes to TraceSource.

AddTraceSource(ILoggingBuilder, String)

Adds a logger that writes to TraceSource.

AddTraceSource(ILoggingBuilder, SourceSwitch, TraceListener)

Adds a logger that writes to TraceSource.

AddTraceSource(ILoggingBuilder, String, TraceListener)

Adds a logger that writes to TraceSource.

AddTraceSource(ILoggingBuilder, SourceSwitch)

Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs

Adds a logger that writes to TraceSource.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddTraceSource(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, System::Diagnostics::SourceSwitch ^ sourceSwitch);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddTraceSource (this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Diagnostics.SourceSwitch sourceSwitch);
static member AddTraceSource : Microsoft.Extensions.Logging.ILoggingBuilder * System.Diagnostics.SourceSwitch -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddTraceSource (builder As ILoggingBuilder, sourceSwitch As SourceSwitch) As ILoggingBuilder

Parameters

builder
ILoggingBuilder

The ILoggingBuilder to use.

sourceSwitch
SourceSwitch

The SourceSwitch to use.

Returns

The ILoggingBuilder so that additional calls can be chained.

Applies to

AddTraceSource(ILoggingBuilder, String)

Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs

Adds a logger that writes to TraceSource.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddTraceSource(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, System::String ^ switchName);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddTraceSource (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string switchName);
static member AddTraceSource : Microsoft.Extensions.Logging.ILoggingBuilder * string -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddTraceSource (builder As ILoggingBuilder, switchName As String) As ILoggingBuilder

Parameters

builder
ILoggingBuilder

The ILoggingBuilder to use.

switchName
String

The name of the SourceSwitch to use.

Returns

The ILoggingBuilder so that additional calls can be chained.

Applies to

AddTraceSource(ILoggingBuilder, SourceSwitch, TraceListener)

Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs

Adds a logger that writes to TraceSource.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddTraceSource(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, System::Diagnostics::SourceSwitch ^ sourceSwitch, System::Diagnostics::TraceListener ^ listener);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddTraceSource (this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Diagnostics.SourceSwitch sourceSwitch, System.Diagnostics.TraceListener listener);
static member AddTraceSource : Microsoft.Extensions.Logging.ILoggingBuilder * System.Diagnostics.SourceSwitch * System.Diagnostics.TraceListener -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddTraceSource (builder As ILoggingBuilder, sourceSwitch As SourceSwitch, listener As TraceListener) As ILoggingBuilder

Parameters

builder
ILoggingBuilder

The ILoggingBuilder to use.

sourceSwitch
SourceSwitch

The SourceSwitch to use.

listener
TraceListener

The TraceListener to use.

Returns

The ILoggingBuilder so that additional calls can be chained.

Applies to

AddTraceSource(ILoggingBuilder, String, TraceListener)

Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs
Source:
TraceSourceFactoryExtensions.cs

Adds a logger that writes to TraceSource.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddTraceSource(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, System::String ^ switchName, System::Diagnostics::TraceListener ^ listener);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddTraceSource (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string switchName, System.Diagnostics.TraceListener listener);
static member AddTraceSource : Microsoft.Extensions.Logging.ILoggingBuilder * string * System.Diagnostics.TraceListener -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddTraceSource (builder As ILoggingBuilder, switchName As String, listener As TraceListener) As ILoggingBuilder

Parameters

builder
ILoggingBuilder

The ILoggingBuilder to use.

switchName
String

The name of the SourceSwitch to use.

listener
TraceListener

The TraceListener to use.

Returns

The ILoggingBuilder so that additional calls can be chained.

Applies to