Add more debug info for controllers

This commit is contained in:
Frederic Guillot 2015-05-31 13:46:33 -04:00
parent 0f01bc90de
commit 3f3363c177
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,10 @@ abstract class Base extends \Core\Base
$this->container = $container;
$this->request = new Request;
$this->response = new Response;
if (DEBUG) {
$this->container['logger']->debug('START_REQUEST='.$_SERVER['REQUEST_URI']);
}
}
/**
@ -63,6 +67,7 @@ abstract class Base extends \Core\Base
$this->container['logger']->debug('SQL_QUERIES={nb}', array('nb' => $this->container['db']->nb_queries));
$this->container['logger']->debug('RENDERING={time}', array('time' => microtime(true) - @$_SERVER['REQUEST_TIME_FLOAT']));
$this->container['logger']->debug('END_REQUEST='.$_SERVER['REQUEST_URI']);
}
}