/**
  * @param LogEvent $event
  */
 public static function serialize(LogEvent $event)
 {
     $event->setFilters(self::prepareUnserializableData($event->getFilters()));
     $event->setData(self::prepareUnserializableData($event->getData()));
     $event->setOptions(self::prepareUnserializableData($event->getOptions()));
 }
Ejemplo n.º 2
0
 /**
  * @param string $method
  * @param array|object  $filters
  * @param array|object  $data
  * @param array  $options
  *
  * @return LogEvent
  */
 private function startQueryLogging(string $method, $filters = null, $data = null, array $options) : LogEvent
 {
     $debugInfo = $this->__debugInfo();
     $event = new LogEvent();
     $event->setFilters($filters);
     $event->setData($data);
     $event->setOptions($options);
     $event->setMethod($method);
     $event->setCollection($debugInfo['collectionName']);
     $this->logger->startLogging($event);
     return $event;
 }