Partager via


ITraceHubClientCallback.BeginTraceStreamAsync Method

Definition

Gets a live stream of events in the specified log. There is explicitly no defined log format that should be written to PipeWriter. It is suggested to use the format implemented by System.Diagnostics.XmlWriterTraceListener and to emit svclog format whenever possible.

public:
 System::Threading::Tasks::Task<IDisposable ^> ^ BeginTraceStreamAsync(Microsoft::VisualStudio::RpcContracts::Logging::LogId logId, System::IO::Pipelines::PipeWriter ^ pipeWriter, Microsoft::VisualStudio::RpcContracts::Logging::LoggingLevelSettings ^ verbositySettings, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<IDisposable> BeginTraceStreamAsync (Microsoft.VisualStudio.RpcContracts.Logging.LogId logId, System.IO.Pipelines.PipeWriter pipeWriter, Microsoft.VisualStudio.RpcContracts.Logging.LoggingLevelSettings verbositySettings, System.Threading.CancellationToken cancellationToken);
abstract member BeginTraceStreamAsync : Microsoft.VisualStudio.RpcContracts.Logging.LogId * System.IO.Pipelines.PipeWriter * Microsoft.VisualStudio.RpcContracts.Logging.LoggingLevelSettings * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
Public Function BeginTraceStreamAsync (logId As LogId, pipeWriter As PipeWriter, verbositySettings As LoggingLevelSettings, cancellationToken As CancellationToken) As Task(Of IDisposable)

Parameters

logId
LogId

Fully-qualified id of the log stream.

pipeWriter
PipeWriter

The PipeWriter to write the log stream into, this should be the same byte-format of the log being stored locally with the running component. When the returned IDisposable is disposed of this PipeWriter will be completed.

verbositySettings
LoggingLevelSettings

The desired logging level settings for the return stream.

cancellationToken
CancellationToken

The cancellation token.

Returns

This is an awaitable task for the stream to begin, and an IDisposable, that, when Dispose() is called, will cause the stream to stop.

Remarks

When a caller of this stream no longer wishes to receive more data from the log stream being provided through pipeWriter, the caller should call Dispose() on the returned value.

Applies to