2024-06-14 10:35:03 -04:00

25 lines
478 B
PHP
Executable File

#!/usr/bin/env php
<?php
require __DIR__ . '/vendor/autoload.php';
use MakerDave\ElasticPush\LogSource;
use Dotenv\Dotenv;
chdir(__DIR__);
$env = Dotenv::createImmutable(__DIR__);
$env->safeLoad();
foreach (new DirectoryIterator(__DIR__ . '/config') as $file) {
if ($file->isDot() || $file->isDir()) {
continue;
}
if ($file->getExtension() !== 'json') {
continue;
}
$worker = new LogSource($file->getPathname());
$worker->work();
}