mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-19 06:47:10 +01:00
Create error.log if doesn't exist, we need from init
This commit is contained in:
@@ -21,6 +21,16 @@ class System
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $path
|
||||
*/
|
||||
private function createFileIfNotExists($path)
|
||||
{
|
||||
if (false === file_exists($path)) {
|
||||
touch($path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -40,6 +50,7 @@ class System
|
||||
ini_set('log_errors', '1');
|
||||
$this->createDirIfNotExists(dirname(__FILE__) . '/../data/logs');
|
||||
$this->createDirIfNotExists(dirname(__FILE__) . '/../data/logs/error');
|
||||
$this->createFileIfNotExists(dirname(__FILE__) . '/../data/logs/error/error.log');
|
||||
ini_set('error_log', dirname(__FILE__) . '/../data/logs/error/error.log');
|
||||
error_reporting(-1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user