다음을 통해 공유


ITraceHubClientCallback Interface

Definition

Interface used to request logging changes from the tracing hub to the client using the tracing hub. Implement this interface to support sending live log streams.

public interface class ITraceHubClientCallback
public interface ITraceHubClientCallback
type ITraceHubClientCallback = interface
Public Interface ITraceHubClientCallback

Remarks

Use the ServiceRpcDescriptor from TraceHubRegistrationService to access the service. It is expected that any library providing a logging utility, like Microsoft.VisualStudio.LogHub will implement this interface directly and provide an abstraction to the client. Extension developers should use the logging utility library provided by Visual Studio when possible and do not need to implement this interface directly.

Methods

BeginTraceStreamAsync(LogId, PipeWriter, LoggingLevelSettings, CancellationToken)

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.

FlushAsync(LogId, CancellationToken)

Requests that the client perform a flush to disk.

Applies to