[HttpKernel] Add request uri to Logger context
... so host info does not get lost in the logging. The current situation does not allow the user to determine at which host an error occured. | Q | A | ------------- | --- | Bug fix? | [no] | New feature? | [yes] | BC breaks? | [no] | Deprecations? | [no] | Tests pass? | [yes] | Fixed tickets | | License | MIT | Doc PR | Fixed typo Distinguish route-params from request-uri Update context consistency ... and inline the context variable. Rename `route_params` to `route_parameters`
This commit is contained in:
parent
8d4fcc0798
commit
c8f1f192b5
@ -140,7 +140,10 @@ class RouterListener implements EventSubscriberInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $this->logger) {
|
if (null !== $this->logger) {
|
||||||
$this->logger->info(sprintf('Matched route "%s"', $parameters['_route']), $parameters);
|
$this->logger->info(sprintf('Matched route "%s"', $parameters['_route']), array(
|
||||||
|
'route_parameters' => $parameters,
|
||||||
|
'request_uri' => $request->getUri(),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$request->attributes->add($parameters);
|
$request->attributes->add($parameters);
|
||||||
|
Reference in New Issue
Block a user