diff --git a/class/Downloader.php b/class/Downloader.php index 1a0bb79..4d2e3b7 100644 --- a/class/Downloader.php +++ b/class/Downloader.php @@ -206,7 +206,15 @@ class Downloader } $cmd .= " --restrict-filenames"; // --restrict-filenames is for specials chars - $cmd .= " > /dev/null & echo $!"; + if($this->config["logs"]) + { + $cmd .= " > ".$this->config["logs"]."/$(date +\"%Y-%m-%d_%H-%M-%S-%N\").log"; + } + else + { + $cmd .= " > /dev/null "; + } + $cmd .= " & echo $!"; shell_exec($cmd); } diff --git a/config/config.php b/config/config.php index 2879ce9..90eaae2 100644 --- a/config/config.php +++ b/config/config.php @@ -8,7 +8,7 @@ return array( "password" => "63a9f0ea7bb98050796b649e85481845", "outputFolder" => "downloads", "extracter" => "avconv", - "log" => true, + "log" => "logs", "max_dl" => 3); ?>