Ejemplo n.º 1
0
 /**
  * writes logs added to this class to log file
  */
 public static function writeLogsToFile()
 {
     if (count(self::$aDbFileLogs)) {
         if ($handle = fopen(ROOT_PATH . cLogsDb::$fileToWrite, 'a+')) {
             cLogsDb::$fileToWrite = "logs/" . getDateToPrint(mktime(), "Ymd") . "a.txt";
             fwrite($handle, "\n----------------------- DB QUERIES " . getDateToPrint(mktime()) . " --------------------\n");
             foreach (cLogsDb::$aDbFileLogs as $log) {
                 fwrite($handle, $log);
             }
             //fwrite($handle, "\n");
             fclose($handle);
         }
     }
 }