From 0b561610f8ac5b9b98d596307735c7b58719e953 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Mon, 17 Oct 2016 21:30:51 -0400 Subject: [PATCH] Reducing DrushTask default verbosity. --- phing/phingcludes/DrushTask.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/phing/phingcludes/DrushTask.php b/phing/phingcludes/DrushTask.php index fc00cfc4c..076951cd7 100644 --- a/phing/phingcludes/DrushTask.php +++ b/phing/phingcludes/DrushTask.php @@ -292,6 +292,10 @@ public function main() { $option = new DrushOption(); $option->setName('verbose'); $this->options[] = $option; + $exec_level = Project::MSG_INFO; + } + else { + $exec_level = Project::MSG_VERBOSE; } foreach ($this->options as $option) { @@ -304,9 +308,8 @@ public function main() { $command[] = $param->getValue(); } - if (!empty($this->dir)) { - $this->log("Changing working directory to: $this->dir"); + $this->log("Changing working directory to: $this->dir", $exec_level); $initial_cwd = getcwd(); chdir($this->dir); } @@ -317,7 +320,7 @@ public function main() { if ($this->passthru) { $command = implode(' ', $command); - $this->log("Executing: $command"); + $this->log("Executing: $command", $exec_level); passthru($command, $return); } else { @@ -325,7 +328,7 @@ public function main() { $command[] = '2>&1'; $command = implode(' ', $command); - $this->log("Executing: $command"); + $this->log("Executing: $command", $exec_level); exec($command, $output, $return); if ($this->logoutput) { @@ -337,7 +340,7 @@ public function main() { } if (isset($initial_cwd)) { - $this->log("Changing working directory back to $initial_cwd."); + $this->log("Changing working directory back to $initial_cwd.", $exec_level); chdir($initial_cwd); }