/** * Sets the job ticket in $record['extra']['job_ticket'] * * {@inheritdoc} */ protected function write(array $record) { $log = $this->manager->create(); $record['extra']['job_ticket'] = $this->job->getTicket(); $this->populateLog($log, $record); $this->manager->save($log); }
public function deleteByJob(JobInterface $job) { $path = $this->buildPath($job->getTicket()); $filesystem = new Filesystem(); if ($filesystem->exists($path)) { $filesystem->remove($path); } }
/** * Get lock name for job object * * @param JobInterface $job * @return string */ private function getLockName(JobInterface $job) { return self::JOB_LOCK_PREFIX . $job->getTicket(); }
/** * {@inheritdoc} */ public function createHandler(JobInterface $job, $level, $bubble) { $handler = new StreamHandler($this->buildPath($job->getTicket()), $level, $bubble); return $this->initHandler($handler); }
/** * {@inheritdoc} */ public function deleteByJob(BaseJobInterface $job) { return $this->deleteLogs($this->findBy(['jobTicket' => $job->getTicket()])); }
/** * @param JobInterface $job * @return string The channel name */ protected function buildChannel(JobInterface $job) { return $job->getTicket(); }