logSecurityEvent static method
Log security event
Implementation
static Future<void> logSecurityEvent({
required String eventDescription,
String? userId,
Map<String, dynamic>? metadata,
}) async {
if (!_config.enabled) return;
final event = AuditEvent(
type: AuditEventType.securityEvent,
stateKey: eventDescription,
userId: userId,
metadata: metadata,
);
await _logEvent(event);
}