| @@ 11-23 (lines=13) @@ | ||
| 8 | /** |
|
| 9 | * {@inheritdoc} |
|
| 10 | */ |
|
| 11 | public function serialize(MessageInterface $message): string |
|
| 12 | { |
|
| 13 | return json_encode([ |
|
| 14 | 'message' => [ |
|
| 15 | 'id' => $message->getId(), |
|
| 16 | 'type' => $message->getType(), |
|
| 17 | 'created' => $message->getCreated(), |
|
| 18 | 'payload' => $message->getPayload(), |
|
| 19 | 'execute_at' => $message->getExecuteAt(), |
|
| 20 | 'retries' => $message->getRetries(), |
|
| 21 | ] |
|
| 22 | ], JSON_INVALID_UTF8_IGNORE); |
|
| 23 | } |
|
| 24 | ||
| 25 | /** |
|
| 26 | * {@inheritdoc} |
|
| @@ 267-277 (lines=11) @@ | ||
| 264 | * |
|
| 265 | * @return array |
|
| 266 | */ |
|
| 267 | private function messageLoggerContext(MessageInterface $message): array |
|
| 268 | { |
|
| 269 | return [ |
|
| 270 | 'id' => $message->getId(), |
|
| 271 | 'created' => $message->getCreated(), |
|
| 272 | 'type' => $message->getType(), |
|
| 273 | 'payload' => $message->getPayload(), |
|
| 274 | 'retries' => $message->getRetries(), |
|
| 275 | 'execute_at' => $message->getExecuteAt(), |
|
| 276 | ]; |
|
| 277 | } |
|
| 278 | ||
| 279 | /** |
|
| 280 | * Interal log method wrapper |
|