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:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Exception;
|
||||
|
||||
use App\Framework\Performance\MemoryMonitor;
|
||||
|
||||
final readonly class SystemContext
|
||||
{
|
||||
public function __construct(
|
||||
@@ -12,12 +14,15 @@ final readonly class SystemContext
|
||||
public ?string $phpVersion = null,
|
||||
public ?string $frameworkVersion = null,
|
||||
public array $environment = []
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public static function current(): self
|
||||
public static function current(?MemoryMonitor $memoryMonitor = null): self
|
||||
{
|
||||
return new self(
|
||||
memoryUsage: self::formatBytes(memory_get_usage(true)),
|
||||
memoryUsage: $memoryMonitor
|
||||
? $memoryMonitor->getCurrentMemory()->toHumanReadable()
|
||||
: self::formatBytes(memory_get_usage(true)),
|
||||
executionTime: isset($_SERVER['REQUEST_TIME_FLOAT'])
|
||||
? microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']
|
||||
: null,
|
||||
@@ -28,7 +33,7 @@ final readonly class SystemContext
|
||||
'sapi' => PHP_SAPI,
|
||||
'timezone' => date_default_timezone_get(),
|
||||
'memory_limit' => ini_get('memory_limit'),
|
||||
'max_execution_time' => ini_get('max_execution_time')
|
||||
'max_execution_time' => ini_get('max_execution_time'),
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -45,7 +50,7 @@ final readonly class SystemContext
|
||||
'execution_time' => $this->executionTime,
|
||||
'php_version' => $this->phpVersion,
|
||||
'framework_version' => $this->frameworkVersion,
|
||||
'environment' => $this->environment
|
||||
'environment' => $this->environment,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user