Added sanity check if logging was enabled

No more wrapping calls to the Log class with a check if it's enabled.
This commit is contained in:
Josh Sherman 2013-09-15 11:55:56 -04:00
parent 391e95c9e8
commit 7746567ec3

View file

@ -115,6 +115,10 @@ class Log
* @return boolean whether or not the write was successful
*/
private static function write($log_type, $message, $format = true, $time = false)
{
$config = Config::getInstance();
if ($config->pickles['logging'] === true)
{
$log_path = LOG_PATH . date('Y/m/d/', ($time == false ? time() : $time));
@ -147,6 +151,9 @@ class Log
return false;
}
}
return false;
}
}
?>