From d96e25c850df8b7bce2c6ad395b0c0b2b8b31709 Mon Sep 17 00:00:00 2001 From: Timendum Date: Wed, 20 Jan 2016 21:24:20 +0100 Subject: [PATCH] test log config --- class/Downloader.php | 10 +++++++++- config/config.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) 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); ?>