Kaynağa Gözat

begin logs

develop
Robin Thoni 8 yıl önce
ebeveyn
işleme
4782a892a3

+ 10
- 0
src/Utils/Business/LuLog.php Dosyayı Görüntüle

@@ -4,7 +4,17 @@ namespace Luticate\Utils\Business;
4 4
 
5 5
 class LuLog {
6 6
 
7
+    /**
8
+     * @var $_logFilePath string
9
+     */
10
+    private static $_logFilePath;
11
+
12
+    public static function setLogFilePath($logFilePath) {
13
+        self::$_logFilePath = $logFilePath;
14
+    }
15
+
7 16
     public static function log($data)
8 17
     {
18
+        file_put_contents(self::$_logFilePath, $data, FILE_APPEND);
9 19
     }
10 20
 }

+ 1
- 0
src/Utils/Controller/LuticateApplication.php Dosyayı Görüntüle

@@ -39,6 +39,7 @@ class LuticateApplication implements MessageComponentInterface
39 39
         $this->_config = $configuration;
40 40
         $this->_clients = new \SplObjectStorage;
41 41
         $this->_router = new LuRoute();
42
+        LuLog::setLogFilePath($this->_config["logs"]);
42 43
         self::$_app = $this;
43 44
     }
44 45
 

Loading…
İptal
Kaydet