Enhance VM provisioning logging by integrating VmProvisionLogger into CreateVirtualMachineJob and AssignIpToGuestJob; update composer dependencies for Plesk integration

This commit is contained in:
baodev0
2026-07-13 13:45:22 +07:00
parent fdb5714e93
commit d283a2c694
5 changed files with 83 additions and 33 deletions
@@ -10,7 +10,7 @@ use Throwable;
class VmProvisionLogger
{
private const JOB_NAME = 'CreateVirtualMachineJob';
private string $jobName = 'System';
private const REDACTED_KEYS = [
'password',
@@ -29,6 +29,12 @@ class VmProvisionLogger
{
}
public function for(string $jobName): static
{
$this->jobName = $jobName;
return $this;
}
public function step(string $title, array $context = []): void
{
$safe = $this->redact($context);
@@ -90,7 +96,7 @@ class VmProvisionLogger
private function jobLabel(): string
{
return self::JOB_NAME;
return $this->jobName;
}
private function redact(array $context): array