Only use error handler and slowlog when debugging is enabled

This commit is contained in:
Kijin Sung 2016-02-13 11:29:09 +09:00
parent 6b4d69bcc2
commit 51f985c215
3 changed files with 56 additions and 32 deletions

View file

@ -712,12 +712,16 @@ function debugPrint($entry = null)
*/
function writeSlowlog($type, $elapsed_time, $obj)
{
static $config = array();
static $config = null;
if (!$config)
{
$config = config('debug');
}
if(!$config['log_slow_queries'] && !$config['log_slow_triggers'] && !$config['log_slow_widgets'])
if (!Rhymix\Framework\Debug::isEnabledForCurrentUser())
{
return;
}
if (!$config['log_slow_queries'] && !$config['log_slow_triggers'] && !$config['log_slow_widgets'])
{
return;
}