Enhance VM provisioning logging by integrating VmProvisionLogger into CreateVirtualMachineJob and AssignIpToGuestJob; update composer dependencies for Plesk integration
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user