ITraceHubRegistrationService.RegisterTraceLogAsync Method
Definition
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.
Registers a new log stream with the tracing hub and exposes it to requesting clients.
public:
System::Threading::Tasks::Task<Microsoft::VisualStudio::RpcContracts::Logging::LogRegistration ^> ^ RegisterTraceLogAsync(Microsoft::VisualStudio::RpcContracts::Logging::LogId logId, Microsoft::VisualStudio::RpcContracts::Logging::LoggerOptions ^ options, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Logging.LogRegistration> RegisterTraceLogAsync (Microsoft.VisualStudio.RpcContracts.Logging.LogId logId, Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions options, System.Threading.CancellationToken cancellationToken);
abstract member RegisterTraceLogAsync : Microsoft.VisualStudio.RpcContracts.Logging.LogId * Microsoft.VisualStudio.RpcContracts.Logging.LoggerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Logging.LogRegistration>
Public Function RegisterTraceLogAsync (logId As LogId, options As LoggerOptions, cancellationToken As CancellationToken) As Task(Of LogRegistration)
Parameters
- logId
- LogId
Id of the log stream within the service, this should be globally unique. The LogName should be a fully-qualified hierarchical name starting with your team's namespace. This should be a string like "Microsoft.VisualStudio.Debugger.Concord.DispatcherDiagnosticsLog" where the last segment is a friendly name of the log. It is important to use a fully-qualified hierarchical name even when this log stream is also classified by a ServiceRpcDescriptor. This must be unique across all log streams from all services and components; when a duplicate request is received the method will return an error code in Status.
- options
- LoggerOptions
Options describing how the tracing hub can treat this log.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A LogRegistration with the LogId of the newly registered log, a status code in Status indicating if the log was already registered or this is a new registration or an error, a LoggingLevelSettings from VerbositySettings indicating the current logging verbosity of the log stream, and a String representing the directory and file prefix where the log should be written to.