陈德本 vor 5 Jahren
Ursprung
Commit
1efd2b699d
1 geänderte Dateien mit 18 neuen und 18 gelöschten Zeilen
  1. 18 18
      Frame/Logger.php

+ 18 - 18
Frame/Logger.php

@@ -250,24 +250,24 @@ class Logger
      */
     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;
     }