OpenXE/cronjobs/log_cleaner.php

13 lines
345 B
PHP
Raw Permalink Normal View History

2021-05-21 08:49:41 +02:00
<?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);