Skip to content

Commit

Permalink
[HttpKernel] Add request uri to Logger context
Browse files Browse the repository at this point in the history
... 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`
  • Loading branch information
rvanlaak committed Jan 16, 2015
1 parent 8d4fcc0 commit c8f1f19
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -140,7 +140,10 @@ public function onKernelRequest(GetResponseEvent $event)
}

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);
Expand Down

0 comments on commit c8f1f19

Please sign in to comment.