Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log bootstrap errors with BufferingLogger #172

Open
wants to merge 1 commit into
base: 6.4
Choose a base branch
from

Conversation

mmenozzi
Copy link

@mmenozzi mmenozzi commented Feb 1, 2023

With APP_DEBUG=0 (which is the default in the prod environment), if an exception occurs in the initial part of request processing (for example when the \Shopware\Storefront\Framework\Routing\Exception\SalesChannelMappingException thrown in the \Shopware\Storefront\Framework\Routing\RequestTransformer::transform() method) nothing is logged. The developer will see a 500 error page without any clue about the problem.

This is the kind of thing that wastes a lot of developers time.

This happens because in the very initial part of the request processing the \Symfony\Component\ErrorHandler\ErrorHandler is not configured with any logger. It will then be configured by the Symfony kernel boot with Monolog but this happens after initial request processing exceptions are eventually thrown.

See also this issue which is somehow related to this.

@CLAassistant
Copy link

CLAassistant commented Feb 1, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants