Exemple #1
0
 /**
  * Serialize message to logger context
  *
  * @param MessageInterface $message
  *
  * @return array
  */
 private function messageLoggerContext(MessageInterface $message)
 {
     return ['id' => $message->getId(), 'created' => $message->getCreated(), 'type' => $message->getType(), 'payload' => $message->getPayload()];
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function serialize(MessageInterface $message)
 {
     return json_encode(['message' => ['id' => $message->getId(), 'type' => $message->getType(), 'created' => $message->getCreated(), 'payload' => $message->getPayload()]]);
 }