Skip to content

[HttpKernel][EventDispatcher] Wrap some log contexts with ClassStub #19829

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

Closed

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Sep 2, 2016

Q A
Branch? master
New feature? yes
Tests pass? yes
License MIT

This PR will be useful when #19614 will be merged to get more detailed log contexts in the "Logs" profiler panel.

This screenshot has been taken with both branches checked out at the same time:
capture du 2016-09-02 17-07-06

Since ClassStub implements __toString, contexts are logged as e.g. request.INFO: Matched route "{route}". {"route":"app_lucky_number","route_parameters":{"_controller": "[object] (Symfony\\Component\\VarDumper\\Caster\\ClassStub: AppBundle\\Controller\\LuckyController::numberAction)","_route": "app_lucky_number"},"request_uri":"http://127.0.0.1:8000/lucky/number","method":"GET"} [] by Monolog's NormalizerFormatter.

Seldaek/monolog#843 or some variant of it should fix this back to a plain string.

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

Successfully merging this pull request may close these issues.

2 participants