Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
47
src/Framework/Health/HealthCheckManagerInitializer.php
Normal file
47
src/Framework/Health/HealthCheckManagerInitializer.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Health;
|
||||
|
||||
use App\Framework\Cache\Cache;
|
||||
use App\Framework\Database\DatabaseManager;
|
||||
use App\Framework\DI\Initializer;
|
||||
use App\Framework\Health\Checks\CacheHealthCheck;
|
||||
use App\Framework\Health\Checks\DatabaseHealthCheck;
|
||||
use App\Framework\Health\Checks\DiskSpaceHealthCheck;
|
||||
use App\Framework\Health\Checks\SystemHealthCheck;
|
||||
|
||||
final readonly class HealthCheckManagerInitializer
|
||||
{
|
||||
public function __construct(
|
||||
private DatabaseManager $databaseManager,
|
||||
private Cache $cache
|
||||
) {
|
||||
}
|
||||
|
||||
#[Initializer]
|
||||
public function __invoke(): HealthCheckManager
|
||||
{
|
||||
$manager = new HealthCheckManager();
|
||||
|
||||
// Register all health checks
|
||||
$manager->registerHealthCheck(
|
||||
new DatabaseHealthCheck($this->databaseManager)
|
||||
);
|
||||
|
||||
$manager->registerHealthCheck(
|
||||
new CacheHealthCheck($this->cache)
|
||||
);
|
||||
|
||||
$manager->registerHealthCheck(
|
||||
new DiskSpaceHealthCheck()
|
||||
);
|
||||
|
||||
$manager->registerHealthCheck(
|
||||
new SystemHealthCheck()
|
||||
);
|
||||
|
||||
return $manager;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user