From c9ffbfca6995de7e663cea27753cca6d36d8f4c4 Mon Sep 17 00:00:00 2001 From: Florian Preusner Date: Wed, 20 May 2015 05:29:10 +0200 Subject: [PATCH] - fix Guzzle is trying to serialize a PDO object, fails with a PDO Exception #8 - saving just a name instead of the whole Symfony request object --- DataCollector/HttpDataCollector.php | 2 +- Log/LogGroup.php | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/DataCollector/HttpDataCollector.php b/DataCollector/HttpDataCollector.php index 7f61cb7..f93ebbf 100644 --- a/DataCollector/HttpDataCollector.php +++ b/DataCollector/HttpDataCollector.php @@ -62,7 +62,7 @@ public function collect(Request $request, Response $response, \Exception $except $this->logger->clear(); $logGroup = $this->getLogGroup($requestId); - $logGroup->setRequest($request); + $logGroup->setRequestName($request->getPathInfo()); $logGroup->setMessages($messages); } // end: collect() diff --git a/Log/LogGroup.php b/Log/LogGroup.php index c98cb52..b894729 100644 --- a/Log/LogGroup.php +++ b/Log/LogGroup.php @@ -21,37 +21,37 @@ class LogGroup { protected $messages = array(); /** - * @var Request + * @var string */ - protected $request; + protected $requestName; /** - * Set Symfony Request + * Set Request Name * * @author Florian Preusner * @version 2.1 * @since 2015-05 * - * @param Request $value + * @param string $value */ - public function setRequest(Request $value) { + public function setRequestName($value) { - $this->request = $value; - } // end: setRequest() + $this->requestName = $value; + } // end: setRequestName() /** - * Get Symfony Request + * Get Request Name * * @author Florian Preusner * @version 2.1 * @since 2015-05 * - * @return Request + * @return string */ - public function getRequest() { + public function getRequestName() { - return $this->request; - } // end: getRequest() + return $this->requestName; + } // end: getRequestName() /** * Set Log Messages