AuditLoggerInterface
AuditLoggerInterface - Framework-level contract for audit logging. Plugins that need audit trail capabilities can consume this interface via tryGetService() for optional audit logging.
AuditLoggerInterface::log()
abstract public function log(string $entityType, string $entityId, string $action, ?string $actorUserId = null, ?string $actorRole = null, ?array $oldValues = null, ?array $newValues = null, ?array $metadata = null): ?mixedLog an audit event.
Parameters
| Nombre | Tipo | Descripción |
|---|---|---|
| $entityType | string | |
| $entityId | string | ID de la entidad afectada (opaque string/UUID identity). |
| $action | string | |
| $actorUserId | (string | null) | ID del actor que realizo la accion (opaque string/UUID identity). |
| $actorRole | ?string | |
| $oldValues | (array<string, mixed> | null) | |
| $newValues | (array<string, mixed> | null) | |
| $metadata | (array<string, mixed> | null) |