/** * @param array $record * @return null * @throws \Exception */ public function write(array $record) { $dao = $this->object->dao(); $this->object->setDate(Timestamp::makeNow()); $this->object->setLevel(InternalLevel::get($record['level'])); $this->object->setMessage($record['decorated']); $dao->add($this->object); }
/** * @param array $record * @return bool */ public function process(array $record) { $recordLevel = InternalLevel::get($record['level']); if ($recordLevel < $this->minProcessingLevel) { return false; } if (!$this->decorator instanceof DecoratorInterface) { $this->setDefaultDecorator(); } $record['decorated'] = $this->decorator->process($record); $this->write($record); return true; }