public function beforeRender(Event $event) { if (!Configure::read('debug')) { return; } $this->_action()->config('serialize.queryLog', 'queryLog'); $this->_controller()->set('queryLog', $this->_getQueryLogs()); }