Commit fff59e36 authored by 刘小敏's avatar 刘小敏

日志权限修改

parent 00b514ba
...@@ -49,7 +49,7 @@ class File ...@@ -49,7 +49,7 @@ class File
$destination = $this->getMasterLogFile(); $destination = $this->getMasterLogFile();
$path = dirname($destination); $path = dirname($destination);
!is_dir($path) && mkdir($path, 0755, true); !is_dir($path) && mkdir($path, 0777, true);
$info = []; $info = [];
foreach ($log as $type => $val) { foreach ($log as $type => $val) {
...@@ -168,7 +168,14 @@ class File ...@@ -168,7 +168,14 @@ class File
$message = $this->parseLog($info); $message = $this->parseLog($info);
} }
return error_log($message, 3, $destination); $result = error_log($message, 3, $destination);
// 设置日志文件权限
if ($result && isset($this->config['file_permission'])) {
@chmod($destination, $this->config['file_permission']);
}
return $result;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment