[HttpKernel] RouterListener uses "context" argument when logging route
This commit is contained in:
parent
d277c16a27
commit
448c03f1f2
@ -128,7 +128,7 @@ class RouterListener implements EventSubscriberInterface
|
||||
}
|
||||
|
||||
if (null !== $this->logger) {
|
||||
$this->logger->info(sprintf('Matched route "%s" (parameters: %s)', $parameters['_route'], $this->parametersToString($parameters)));
|
||||
$this->logger->info(sprintf('Matched route "%s"', $parameters['_route']), $parameters);
|
||||
}
|
||||
|
||||
$request->attributes->add($parameters);
|
||||
@ -150,16 +150,6 @@ class RouterListener implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
private function parametersToString(array $parameters)
|
||||
{
|
||||
$pieces = array();
|
||||
foreach ($parameters as $key => $val) {
|
||||
$pieces[] = sprintf('"%s": "%s"', $key, (is_string($val) ? $val : json_encode($val)));
|
||||
}
|
||||
|
||||
return implode(', ', $pieces);
|
||||
}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
|
Reference in New Issue
Block a user