OpenXE/cronjobs/log_cleaner.php
2021-05-21 08:49:41 +02:00

13 lines
345 B
PHP

<?php
declare(strict_types=1);
use Xentral\Modules\Log\Service\DatabaseLogService;
/** @var ApplicationCore $app */
/** @var DatabaseLogService $logService */
$logService = $app->Container->get('DatabaseLogService');
$cleanupInterval = (int)$app->erp->Firmendaten('cleaner_logfile_tage');
$logService->removeLogsOlderThan($cleanupInterval);