Files
nextcloud-tables/lib/Service/Support/DefaultAuditLogService.php
Arthur Schiwon 1849033dbc style(PHP): adjust to codestyle updates
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-02-10 12:14:18 +01:00

25 lines
639 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Tables\Service\Support;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Log\Audit\CriticalActionPerformedEvent;
final class DefaultAuditLogService implements AuditLogServiceInterface {
public function __construct(
private IEventDispatcher $eventDispatcher,
) {
}
public function log(string $message, array $context): void {
$auditEvent = new CriticalActionPerformedEvent($message, $context);
$this->eventDispatcher->dispatchTyped($auditEvent);
}
}