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:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user