mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
N°4261 - New log handler dedicated to Exceptions & use of it in the portal's Exception listener
Such Exceptions are triggered with a Warning level and default the minimum default level in order to write in DB is above, so the behavior is not modified: - logs are written in errors.log (with a warning elvel instead of an error) - logs are not written in DB unless `log_level_min.write_in_db` is changed
This commit is contained in:
@@ -86,7 +86,7 @@ class ExceptionListener implements ContainerAwareInterface
|
||||
}
|
||||
|
||||
// Log exception in iTop log
|
||||
IssueLog::Error($sErrorTitle.': '.$sErrorMessage);
|
||||
\ExceptionLog::FromException($oException, ['uri' => $oEvent->getRequest()->getUri()]);
|
||||
|
||||
// Prepare data for template
|
||||
$aData = array(
|
||||
@@ -104,8 +104,7 @@ class ExceptionListener implements ContainerAwareInterface
|
||||
else
|
||||
{
|
||||
$oResponse = new Response();
|
||||
$oResponse->setContent($this->oContainer->get('twig')->render('itop-portal-base/portal/templates/errors/layout.html.twig',
|
||||
$aData));
|
||||
$oResponse->setContent($this->oContainer->get('twig')->render('itop-portal-base/portal/templates/errors/layout.html.twig', $aData));
|
||||
}
|
||||
$oResponse->setStatusCode($iStatusCode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user