Skip to content

Commit

Permalink
[HttpRequest] Fixed verbose mode. (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
siad007 authored Sep 3, 2020
1 parent 8a6a501 commit 06668f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/phing/tasks/ext/HttpRequestTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use GuzzleHttp\Middleware;
use Psr\Http\Message\ResponseInterface;
use Symfony\Component\Console\Logger\ConsoleLogger;
use Symfony\Component\Console\Output\ConsoleOutput;

/**
* A HTTP request task.
Expand Down Expand Up @@ -150,7 +151,7 @@ function ($carry, Parameter $postParameter) {
}

if ($this->verbose) {
self::getHandlerStack()->push(Middleware::log(new ConsoleLogger(), new \GuzzleHttp\MessageFormatter()));
self::getHandlerStack()->push(Middleware::log(new ConsoleLogger(new ConsoleOutput()), new \GuzzleHttp\MessageFormatter()));
}

return parent::request($options);
Expand Down

0 comments on commit 06668f8

Please sign in to comment.