diff options
author | Frédéric Guillot <fred@kanboard.net> | 2015-01-02 17:19:13 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2015-01-02 17:19:13 -0500 |
commit | 3076ba22dd8346725b4e1ad757532c00df5b18d9 (patch) | |
tree | e893c113c34d86c5dc923953754dc68c4b1d842d /app/Controller | |
parent | c32567857db9bb1a6dfa339f58d817c97f64db11 (diff) |
Fix bugs, improve perfs and use SimpleLogger instead of Monolog
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/Base.php | 6 |
1 files changed, 5 insertions, 1 deletions
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'])); } } |