machineId = $machineId; $this->logData = $logData; } public function getMachineId(): int { return $this->machineId; } public function handle(MachineService $service): void { try { $service->recordLog($this->machineId, $this->logData); } catch (\Exception $e) { Log::error("Failed to process machine log for machine {$this->machineId}: " . $e->getMessage()); } } }