Stops logging details when reaching $maxLogCalls to conserve memory use
 /**
  * @covers \eZ\Publish\Core\Persistence\Cache\PersistenceLogger::getCalls
  * @depends testGetCountValues
  *
  * @param \eZ\Publish\Core\Persistence\Cache\PersistenceLogger $logger
  */
 public function testGetCallValues($logger)
 {
     $method = __CLASS__ . '::testLogCall';
     $this->assertEquals(array(array('method' => $method, 'arguments' => array()), array('method' => $method, 'arguments' => array()), array('method' => $method, 'arguments' => array()), array('method' => $method, 'arguments' => array(33))), $logger->getCalls());
 }
Esempio n. 2
0
 /**
  * @return \eZ\Publish\SPI\Persistence\Content\UrlWildcard\Handler
  * @todo Create cache implementation so we can avoid injecting persistenceHandler and logger
  */
 public function urlWildcardHandler()
 {
     $this->logger->logUnCachedHandler(__METHOD__);
     return $this->persistenceHandler->urlWildcardHandler();
 }
 public function collect(Request $request, Response $response, \Exception $exception = null)
 {
     $this->data = ['count' => $this->logger->getCount(), 'calls_logging_enabled' => $this->logger->isCallsLoggingEnabled(), 'calls' => $this->logger->getCalls(), 'handlers' => $this->logger->getLoadedUnCachedHandlers()];
 }
 /**
  * Collects data for the given Request and Response.
  *
  * @param Request    $request   A Request instance
  * @param Response   $response  A Response instance
  * @param \Exception $exception An Exception instance
  *
  * @api
  */
 public function collect(Request $request, Response $response, \Exception $exception = null)
 {
     $this->data = array('count' => $this->logger->getCount(), 'calls' => $this->logger->getCalls(), 'handlers' => $this->logger->getLoadedUnCachedHandlers());
 }
 /**
  * Collects data for the given Request and Response.
  *
  * @param Request    $request   A Request instance
  * @param Response   $response  A Response instance
  * @param \Exception $exception An Exception instance
  *
  * @api
  */
 public function collect(Request $request, Response $response, \Exception $exception = null)
 {
     $this->data = array('count' => $this->logger->getCount(), 'calls_logging_enabled' => $this->logger->isCallsLoggingEnabled(), 'calls' => $this->logger->getCalls(), 'handlers' => $this->logger->getLoadedUnCachedHandlers(), 'templates' => TemplateDebugInfo::getTemplatesList(), 'legacy_templates' => TemplateDebugInfo::getLegacyTemplatesList($this->legacyKernel));
 }