TsgcWSAPIKeyManager › Methods › ClearAuditLog
Clears the audit log for a specific key or (when empty) for all keys.
procedure ClearAuditLog(const aKey: string = '');
| Name | Type | Description |
|---|---|---|
aKey | const string | Raw plaintext key whose entries should be discarded. Pass an empty string to wipe the entire audit log. |
Destructive — removes every audit entry whose KeyPrefix matches the supplied key (or every entry when aKey is empty). The file-backed log (when Audit.LogFile is set) is truncated accordingly. Use it to honour a GDPR erasure request for a specific customer's key, or to shrink the log after exporting it to your SIEM. Does not affect the key store itself — the key continues to validate normally afterwards. Fires nothing (the clear action itself is not audited).
// GDPR erasure for a single customer key
sgcWSAPIKeyManager1.ClearAuditLog(vKey);
// Wipe the entire audit log
sgcWSAPIKeyManager1.ClearAuditLog;