Share via


IAuditLogService.WriteEventAsync Method

Definition

Writes an event entry into IDE managed audit log instance.

public System.Threading.Tasks.Task WriteEventAsync(Microsoft.VisualStudio.RpcContracts.Logging.AuditLogEventType eventType, Microsoft.VisualStudio.RpcContracts.Logging.AuditLogSource source, string message, System.Collections.Generic.IReadOnlyDictionary<string,string>? eventData, System.Threading.CancellationToken cancellationToken);
abstract member WriteEventAsync : Microsoft.VisualStudio.RpcContracts.Logging.AuditLogEventType * Microsoft.VisualStudio.RpcContracts.Logging.AuditLogSource * string * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function WriteEventAsync (eventType As AuditLogEventType, source As AuditLogSource, message As String, eventData As IReadOnlyDictionary(Of String, String), cancellationToken As CancellationToken) As Task

Parameters

eventType
AuditLogEventType

Type of the event being recorded.

source
AuditLogSource

Source of the event, this predetermined list is used for audit monitoring tools to quickly filter to known sources.

message
String

Message to be displayed as the event content.

eventData
IReadOnlyDictionary<String,String>

Any other data to be included in the event.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

a Task that is completed when event is submitted to audit log.

Applies to