diff --git a/Service/MessageConsumer/EventListener/Monitor.php b/Service/MessageConsumer/EventListener/Monitor.php index cbc680d..a4f3b41 100644 --- a/Service/MessageConsumer/EventListener/Monitor.php +++ b/Service/MessageConsumer/EventListener/Monitor.php @@ -20,7 +20,7 @@ public function onMessageReceived(MessageReceivedEvent $event) /// @todo this might give php warnings /// We could also check if Symfony\Component\VarDumper is available and use it instead... if (class_exists('Doctrine\Common\Util\Debug')) { - echo "Received a message at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . \Doctrine\Common\Util\Debug::dump($event->getMessage()) . "\n"; + echo "Received a message at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . \Doctrine\Common\Util\Debug::dump($event->getMessage(), 2, false, false) . "\n"; } else { echo "Received a message at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . var_export($event->getMessage(), true) . "\n"; } @@ -31,7 +31,7 @@ public function onMessageConsumed(MessageConsumedEvent $event) /// @todo this might give php warnings /// We could also check if Symfony\Component\VarDumper is available and use it instead... if (class_exists('Doctrine\Common\Util\Debug')) { - echo "Message finished consumption at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . \Doctrine\Common\Util\Debug::dump($event->getConsumptionResult()) . "\n"; + echo "Message finished consumption at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . \Doctrine\Common\Util\Debug::dump($event->getConsumptionResult(), 2, false, false) . "\n"; } else { echo "Message finished consumption at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . var_export($event->getConsumptionResult(), true) . "\n"; } @@ -42,7 +42,7 @@ public function onMessageConsumptionFailed(MessageConsumptionFailedEvent $event) /// @todo this might give php warnings /// We could also check if Symfony\Component\VarDumper is available and use it instead... if (class_exists('Doctrine\Common\Util\Debug')) { - echo "Message failed consumption at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . \Doctrine\Common\Util\Debug::dump($event->getException()) . "\n"; + echo "Message failed consumption at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . \Doctrine\Common\Util\Debug::dump($event->getException(), 2, false, false) . "\n"; } else { echo "Message failed consumption at " . strftime('%Y/%m/%d - %H:%M:%S', time()) . ": " . var_export($event->getException(), true) . "\n"; } diff --git a/news.md b/news.md index 7bf3470..dec3bed 100644 --- a/news.md +++ b/news.md @@ -10,6 +10,8 @@ * CHANGED: The interfaces ConsumerInterface and MessageInterface have acquired a new method each. If you have implemented a driver you will need to adapt your code. +* FIXED: the `Monitor` event listener does not dump twice any more the received messages nor strip html tags + # Ver 0.3