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:
parent
391e95c9e8
commit
7746567ec3
1 changed files with 30 additions and 23 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue