Beispiel #1
0
 protected function initLogType(\Ess\M2ePro\Model\Connector\Connection\Response\Message $message)
 {
     if ($message->isError()) {
         $this->setStatus(\Ess\M2ePro\Helper\Data::STATUS_ERROR);
         return \Ess\M2ePro\Model\Log\AbstractLog::TYPE_ERROR;
     }
     if ($message->isWarning()) {
         $this->setStatus(\Ess\M2ePro\Helper\Data::STATUS_WARNING);
         return \Ess\M2ePro\Model\Log\AbstractLog::TYPE_WARNING;
     }
     if ($message->isSuccess()) {
         $this->setStatus(\Ess\M2ePro\Helper\Data::STATUS_SUCCESS);
         return \Ess\M2ePro\Model\Log\AbstractLog::TYPE_SUCCESS;
     }
     if ($message->isNotice()) {
         $this->setStatus(\Ess\M2ePro\Helper\Data::STATUS_SUCCESS);
         return \Ess\M2ePro\Model\Log\AbstractLog::TYPE_NOTICE;
     }
     $this->setStatus(\Ess\M2ePro\Helper\Data::STATUS_ERROR);
     return \Ess\M2ePro\Model\Log\AbstractLog::TYPE_ERROR;
 }
 private function getLogsPriority(\Ess\M2ePro\Model\Connector\Connection\Response\Message $message)
 {
     if ($message->isError()) {
         return \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_HIGH;
     }
     if ($message->isNotice()) {
         return \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_LOW;
     }
     return \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_MEDIUM;
 }
 protected function getPriority(\Ess\M2ePro\Model\Connector\Connection\Response\Message $message)
 {
     if ($message->isWarning() || $message->isSuccess()) {
         return \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_MEDIUM;
     }
     if ($message->isNotice()) {
         return \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_LOW;
     }
     return \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_HIGH;
 }