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:
@@ -2,8 +2,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Framework\Performance\PerformanceMeter;
|
||||
use App\Framework\Performance\EnhancedPerformanceCollector;
|
||||
use App\Framework\DateTime\SystemClock;
|
||||
use App\Framework\DateTime\SystemHighResolutionClock;
|
||||
use App\Framework\Core\AppBootstrapper;
|
||||
use App\Framework\Performance\MemoryMonitor;
|
||||
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
require __DIR__ . '/../src/Framework/Debug/helpers.php';
|
||||
@@ -13,6 +16,16 @@ ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
spl_autoload_register(function($class) {
|
||||
if (empty($class)) {
|
||||
error_log('Empty class name detected in autoloader. Stack trace: ' .
|
||||
json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10)));
|
||||
return false; // Don't throw, just log and continue
|
||||
}
|
||||
return false;
|
||||
}, true, true);
|
||||
|
||||
|
||||
register_shutdown_function(function() {
|
||||
$error = error_get_last();
|
||||
if ($error !== null) {
|
||||
@@ -20,9 +33,6 @@ register_shutdown_function(function() {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$meter = new PerformanceMeter();
|
||||
|
||||
// Konfiguration
|
||||
$config = [
|
||||
'debug' => true,
|
||||
@@ -32,7 +42,12 @@ $config = [
|
||||
|
||||
// Anwendung initialisieren und ausführen
|
||||
$basePath = dirname(__DIR__);
|
||||
$bootstrapper = new AppBootstrapper($basePath, $meter, $config);
|
||||
// Create dependencies for enhanced performance collector
|
||||
$clock = new SystemClock();
|
||||
$highResClock = new SystemHighResolutionClock();
|
||||
$memoryMonitor = new MemoryMonitor();
|
||||
$collector = new EnhancedPerformanceCollector($clock, $highResClock, $memoryMonitor, enabled: true);
|
||||
$bootstrapper = new AppBootstrapper($basePath, $collector, $memoryMonitor);
|
||||
$app = $bootstrapper->bootstrapWeb();
|
||||
|
||||
// Anwendung ausführen
|
||||
|
||||
Reference in New Issue
Block a user