protected function log()
    {

        $this->worker
            ->setInstance($this->instance);
        // If instance can be called
        if($this->worker->ping()) {
            $infos = $this->worker->getInfos();
            $createdAt = new \DateTime();

            $log = $this->logManager->createNew();
            $log->setMemory($infos['Memory']['used_memory']);
            $log->setCpu($infos['CPU']['used_cpu_sys']);
            $log->setNbClients(sizeof($this->worker->getClients()));
            $log->setCreatedAt($createdAt);
            // Add log
            $this->instance->addLog($log);
        }
    }