Add request method to logger messages
While debugging some functional tests I was looking at the test.log. It would have been quite useful to know if the request was a POST or GET. This adds to the log details.
This commit is contained in:
parent
352997e61e
commit
d751d596e7
@ -108,6 +108,7 @@ class RouterListener implements EventSubscriberInterface
|
||||
'route' => isset($parameters['_route']) ? $parameters['_route'] : 'n/a',
|
||||
'route_parameters' => $parameters,
|
||||
'request_uri' => $request->getUri(),
|
||||
'method' => $request->getMethod(),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -150,8 +150,8 @@ class RouterListenerTest extends \PHPUnit_Framework_TestCase
|
||||
public function getLoggingParameterData()
|
||||
{
|
||||
return array(
|
||||
array(array('_route' => 'foo'), 'Matched route "{route}".', array('route' => 'foo', 'route_parameters' => array('_route' => 'foo'), 'request_uri' => 'http://localhost/')),
|
||||
array(array(), 'Matched route "{route}".', array('route' => 'n/a', 'route_parameters' => array(), 'request_uri' => 'http://localhost/')),
|
||||
array(array('_route' => 'foo'), 'Matched route "{route}".', array('route' => 'foo', 'route_parameters' => array('_route' => 'foo'), 'request_uri' => 'http://localhost/', 'method' => 'GET')),
|
||||
array(array(), 'Matched route "{route}".', array('route' => 'n/a', 'route_parameters' => array(), 'request_uri' => 'http://localhost/', 'method' => 'GET')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user