8p / EightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony
MIT License
440 stars 71 forks source link

Logs are cleared when Exception is shown in development #61

Closed siraic closed 8 years ago

siraic commented 8 years ago

When an exception occurs in development, a subrequest is made to twig.controller.exception:showAction to show the symfony exception page.

This means that a second call is made to HttpDataCollector::collect, this function contains the lines:

        // clear log to have only messages related to symfony request context
        $this->logger->clear();

This means that on the second call, all message will be cleared, and none will show up in in the profiler.

Fixing this might be as simple as removing this line, but I'm not sure how many side-effects it will have.

EDIT: on second thought, it might be better change setMessages to addMessages.

I'm on Symfony 3.1.4

florianpreusner commented 8 years ago

Thanks!