|
@@ -116,17 +116,19 @@ class Log
|
|
|
$pid = posix_getpid();
|
|
|
|
|
|
$log_file = BASE_DATA_PATH . '/log/' . date('Ymd', time()) . '.log';
|
|
|
+
|
|
|
+ if(!file_exists($log_file)){
|
|
|
+ touch($log_file);
|
|
|
+ chmod($log_file,777);
|
|
|
+ //chown($log_file,'apache');
|
|
|
+ }
|
|
|
+
|
|
|
if(self::$cur_file_name != $log_file)
|
|
|
{
|
|
|
if(self::$cur_file != null) {
|
|
|
fclose(self::$cur_file);
|
|
|
}
|
|
|
self::$cur_file_name = $log_file;
|
|
|
- if(!file_exists($log_file)){
|
|
|
- touch($log_file);
|
|
|
- chmod($log_file,777);
|
|
|
- //chown($log_file,'apache');
|
|
|
- }
|
|
|
self::$cur_file = fopen($log_file,'a+');
|
|
|
}
|
|
|
|