|
@@ -250,24 +250,24 @@ class Logger
|
|
|
*/
|
|
*/
|
|
|
private static function getLogPath($filename)
|
|
private static function getLogPath($filename)
|
|
|
{
|
|
{
|
|
|
- static $path = '';
|
|
|
|
|
- if (!$path) {
|
|
|
|
|
- if ((!file_exists(self::$logPath))) {
|
|
|
|
|
- @mkdir(self::$logPath, 0777, true);
|
|
|
|
|
- }
|
|
|
|
|
- $path = is_writable(self::$logPath) ? self::$logPath : sys_get_temp_dir();
|
|
|
|
|
- $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . date('Ym') . DIRECTORY_SEPARATOR . date('d') . DIRECTORY_SEPARATOR;
|
|
|
|
|
- if (!is_writable($path)) {
|
|
|
|
|
- if (!file_exists($path)) {
|
|
|
|
|
- mkdir($path, 0777, true);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- $filename = strtolower(strtr($filename, array(
|
|
|
|
|
- ' ' => '',
|
|
|
|
|
- DIRECTORY_SEPARATOR => ''
|
|
|
|
|
- )));
|
|
|
|
|
- $filename = $path . $filename . '.log';
|
|
|
|
|
|
|
+// static $path = '';
|
|
|
|
|
+// if (!$path) {
|
|
|
|
|
+// if ((!file_exists(self::$logPath))) {
|
|
|
|
|
+// @mkdir(self::$logPath, 0777, true);
|
|
|
|
|
+// }
|
|
|
|
|
+// $path = is_writable(self::$logPath) ? self::$logPath : sys_get_temp_dir();
|
|
|
|
|
+// $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . date('Ym') . DIRECTORY_SEPARATOR . date('d') . DIRECTORY_SEPARATOR;
|
|
|
|
|
+// if (!is_writable($path)) {
|
|
|
|
|
+// if (!file_exists($path)) {
|
|
|
|
|
+// mkdir($path, 0777, true);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// $filename = strtolower(strtr($filename, array(
|
|
|
|
|
+// ' ' => '',
|
|
|
|
|
+// DIRECTORY_SEPARATOR => ''
|
|
|
|
|
+// )));
|
|
|
|
|
+// $filename = $path . $filename . '.log';
|
|
|
return $filename;
|
|
return $filename;
|
|
|
}
|
|
}
|
|
|
|
|
|