public function warn($message, array $context = array()) { return $this->addRecord(self::WARNING, $message, $context); }
/** * Gets a message from RabbitMQ, checks it's a valid transaction and saves it into DB. * * @param AMQPMessage $rawMessage */ public function process(AMQPMessage $rawMessage) { $this->logger->debug('Processing message ' . $rawMessage->body); try { $message = Transaction::extractFromJson($rawMessage->body); $message->checkSanity(); $this->messageDbModel->save($message); } catch (Exception $e) { // either transaction contains invalid data or there was an error in db $this->logger->warn($e->getMessage()); } }