From 3076ba22dd8346725b4e1ad757532c00df5b18d9 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 2 Jan 2015 17:19:13 -0500 Subject: Fix bugs, improve perfs and use SimpleLogger instead of Monolog --- app/Controller/Base.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/Controller') diff --git a/app/Controller/Base.php b/app/Controller/Base.php index cd807d56..4719ebe4 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -101,9 +101,13 @@ abstract class Base public function __destruct() { if (DEBUG) { + foreach ($this->container['db']->getLogMessages() as $message) { - $this->container['logger']->addDebug($message); + $this->container['logger']->debug($message); } + + $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'])); } } -- cgit v1.2.3