Skip to content

Commit

Permalink
Additional logging in ProvisioningTargetsTable (CFM-254)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Feb 13, 2024
1 parent 8e6bdd1 commit 823bda8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/src/Model/Table/ProvisioningTargetsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ public function provision(
ProvisionerModeEnum::Queue,
ProvisionerModeEnum::QueueOnError
])) {
$this->llog('trace', "Skipping Provisioning Target with mode " . $t->status . " (automatic context)", $t->id);
$this->llog('trace', "Skipping Provisioning Target " . $t->id . " with mode " . $t->status . " (automatic context)", $t->id);
continue 2;
}
break;
case ProvisioningContextEnum::Enrollment:
if($t->status == ProvisionerModeEnum::Manual) {
$this->llog('trace', "Skipping Provisioning Target with mode " . $t->status . " (enrollment context)", $t->id);
$this->llog('trace', "Skipping Provisioning Target " . $t->id . " with mode " . $t->status . " (enrollment context)", $t->id);
continue 2;
}
break;
Expand All @@ -200,6 +200,8 @@ public function provision(

$result = $this->$pluginModel->provision($t->$uPluginModel, $provisionedModel, $data, $eligibility);

$this->alog('trace', $result);

$this->ProvisioningHistoryRecords->record(
provisioningTargetId: $t->id,
comment: $result['comment'],
Expand All @@ -209,6 +211,8 @@ public function provision(
);
}
catch(\Exception $e) {
$this->llog('error', "Provisioning failure: " . $e->getMessage());

$this->ProvisioningHistoryRecords->record(
provisioningTargetId: $t->id,
comment: $e->getMessage(),
Expand Down

0 comments on commit 823bda8

Please sign in to comment.