public function process(ProcessDataEvent $event)
 {
     $data = $event->getData();
     if (!$data instanceof LoggableInterface) {
         return;
     }
     $event->setData($data->toLogEntry());
 }
 public function processStructure(ProcessDataEvent $event)
 {
     $data = array();
     $record = $event->getRecord();
     foreach ($event->getData() as $key => $entry) {
         $data[$key] = $this->process($entry, $record);
     }
     $event->setData($data);
 }
 public function process(ProcessDataEvent $event)
 {
     $data = $event->getData();
     if (!$data instanceof \SplObjectStorage) {
         return;
     }
     $storage = array();
     foreach ($data as $eachObject) {
         $storage[$data->key()] = array('object' => $eachObject, 'info' => $data->getInfo());
     }
     $event->setData($storage);
     // The propagation is not stopped, as the default implementation will process the new structure (array).
 }