Aracılığıyla paylaş


TraceConfiguration.RegisterLogSourceAsync Method

Definition

Overloads

RegisterLogSourceAsync(LogId, LoggerOptions, CancellationToken)

Registers a new log stream with the tracing hub and exposes it to requesting clients.

RegisterLogSourceAsync(LogId, LoggerOptions, TraceSource, CancellationToken)

Registers a new log stream with the tracing hub and exposes it to requesting clients.

RegisterLogSourceAsync(LogId, LoggerOptions, TraceSource, Boolean, CancellationToken)

RegisterLogSourceAsync(LogId, LoggerOptions, CancellationToken)

Registers a new log stream with the tracing hub and exposes it to requesting clients.

public System.Threading.Tasks.ValueTask<System.Diagnostics.TraceSource> RegisterLogSourceAsync (Microsoft.VisualStudio.RpcContracts.Logging.LogId id, Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member RegisterLogSourceAsync : Microsoft.VisualStudio.RpcContracts.Logging.LogId * Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Diagnostics.TraceSource>
override this.RegisterLogSourceAsync : Microsoft.VisualStudio.RpcContracts.Logging.LogId * Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Diagnostics.TraceSource>
Public Function RegisterLogSourceAsync (id As LogId, options As LoggerOptions, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TraceSource)

Parameters

id
LogId

Representing the fully-qualified id of a given log stream and all information that can be used to identify the log.

options
LoggerOptions

Logging options for a given log stream.

cancellationToken
CancellationToken

The CancellationToken.

Returns

Results of calls to register a new trace log stream.

Implements

Applies to

RegisterLogSourceAsync(LogId, LoggerOptions, TraceSource, CancellationToken)

Registers a new log stream with the tracing hub and exposes it to requesting clients.

public System.Threading.Tasks.ValueTask<System.Diagnostics.TraceSource> RegisterLogSourceAsync (Microsoft.VisualStudio.RpcContracts.Logging.LogId id, Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions options, System.Diagnostics.TraceSource? traceSource, System.Threading.CancellationToken cancellationToken = default);
abstract member RegisterLogSourceAsync : Microsoft.VisualStudio.RpcContracts.Logging.LogId * Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions * System.Diagnostics.TraceSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Diagnostics.TraceSource>
override this.RegisterLogSourceAsync : Microsoft.VisualStudio.RpcContracts.Logging.LogId * Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions * System.Diagnostics.TraceSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Diagnostics.TraceSource>
Public Function RegisterLogSourceAsync (id As LogId, options As LoggerOptions, traceSource As TraceSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TraceSource)

Parameters

id
LogId

Representing the fully-qualified id of a given log stream and all information that can be used to identify the log.

options
LoggerOptions

Logging options for a given log stream.

traceSource
TraceSource

The TraceSource

cancellationToken
CancellationToken

The CancellationToken.

Returns

Results of calls to register a new trace log stream.

Implements

Applies to

RegisterLogSourceAsync(LogId, LoggerOptions, TraceSource, Boolean, CancellationToken)

System.Object.RegisterLogSourceAsync(Microsoft.VisualStudio.RpcContracts.Logging.LogId,Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions,System.Diagnostics.TraceSource,System.Boolean,System.Threading.CancellationToken)
public System.Threading.Tasks.ValueTask<System.Diagnostics.TraceSource> RegisterLogSourceAsync (Microsoft.VisualStudio.RpcContracts.Logging.LogId id, Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions options, System.Diagnostics.TraceSource? traceSource, bool isBootstrappedService, System.Threading.CancellationToken cancellationToken = default);
member this.RegisterLogSourceAsync : Microsoft.VisualStudio.RpcContracts.Logging.LogId * Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions * System.Diagnostics.TraceSource * bool * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Diagnostics.TraceSource>
Public Function RegisterLogSourceAsync (id As LogId, options As LoggerOptions, traceSource As TraceSource, isBootstrappedService As Boolean, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TraceSource)

Parameters

id
LogId
options
LoggerOptions
traceSource
TraceSource
isBootstrappedService
Boolean
cancellationToken
CancellationToken

Returns

Applies to