[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:
Richard van Laak 2015-01-08 11:37:09 +01:00 committed by Richard
parent 8d4fcc0798
commit c8f1f192b5
1 changed files with 4 additions and 1 deletions

View File

@ -140,7 +140,10 @@ class RouterListener implements EventSubscriberInterface
}
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);