From ce4aa097d87a05c811df4039feb28c93c2096abe Mon Sep 17 00:00:00 2001 From: Timendum Date: Wed, 20 Jan 2016 22:02:24 +0100 Subject: [PATCH] logs as txt --- class/Downloader.php | 2 +- class/FileHandler.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/class/Downloader.php b/class/Downloader.php index 0ed804e..af921bc 100644 --- a/class/Downloader.php +++ b/class/Downloader.php @@ -232,7 +232,7 @@ class Downloader $cmd .= " --restrict-filenames"; // --restrict-filenames is for specials chars if($this->config["log"]) { - $cmd .= " > ".$this->config["logFolder"]."/$(date +\"%Y-%m-%d_%H-%M-%S-%N\").log"; + $cmd .= " > ".$this->config["logFolder"]."/$(date +\"%Y-%m-%d_%H-%M-%S-%N\").txt"; } else { diff --git a/class/FileHandler.php b/class/FileHandler.php index afd649d..aab126a 100644 --- a/class/FileHandler.php +++ b/class/FileHandler.php @@ -42,7 +42,7 @@ class FileHandler $folder = dirname(__DIR__).'/'.$this->config["logFolder"].'/'; - foreach(glob($folder.'*.log', GLOB_BRACE) as $file) + foreach(glob($folder.'*.txt', GLOB_BRACE) as $file) { $content = []; $content["name"] = str_replace($folder, "", $file); @@ -74,7 +74,7 @@ class FileHandler $folder = dirname(__DIR__).'/'.$this->config["logFolder"].'/'; $i = 0; - foreach(glob($folder.'*.log', GLOB_BRACE) as $file) + foreach(glob($folder.'*.txt', GLOB_BRACE) as $file) { if($i == $id) {