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:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Logging\Handlers;
@@ -12,7 +13,8 @@ final class WebHandler implements LogHandler
public function __construct(
private readonly LogLevel $minLevel = LogLevel::DEBUG,
private readonly bool $debugOnly = true
) {}
) {
}
public function isHandling(LogRecord $record): bool
{
@@ -22,7 +24,7 @@ final class WebHandler implements LogHandler
}
// Debug-Modus-Check
if ($this->debugOnly && !filter_var(getenv('APP_DEBUG'), FILTER_VALIDATE_BOOLEAN)) {
if ($this->debugOnly && ! filter_var(getenv('APP_DEBUG'), FILTER_VALIDATE_BOOLEAN)) {
return false;
}
@@ -55,12 +57,11 @@ final class WebHandler implements LogHandler
// Context-Daten falls vorhanden
$context = $record->getContext();
if (!empty($context)) {
if (! empty($context)) {
$logLine .= ' | Context: ' . json_encode($context, JSON_UNESCAPED_SLASHES);
}
// In error_log schreiben
error_log($logLine);
}
}