Skip to content
Snippets Groups Projects
Commit ea01aa2f authored by Adriano Cori's avatar Adriano Cori Committed by Adriano Cori
Browse files

Issue #3051747 by aronne: Redirect debug output to file

parent 889eb190
No related branches found
No related tags found
No related merge requests found
...@@ -209,8 +209,12 @@ class HttpClient implements HttpClientInterface { ...@@ -209,8 +209,12 @@ class HttpClient implements HttpClientInterface {
public function getClientConfig() { public function getClientConfig() {
$api = $this->getApi(); $api = $this->getApi();
$config = !empty($api['config']) ? $api['config'] : []; $config = !empty($api['config']) ? $api['config'] : [];
$config['handler'] = HandlerStack::create(); $config['handler'] = HandlerStack::create();
if (!empty($config['debug']) && is_file($config['debug'])) {
$config['debug'] = fopen($config['debug'], 'a');
}
$event = new HttpClientHandlerStackEvent($config['handler'], $this->serviceApi); $event = new HttpClientHandlerStackEvent($config['handler'], $this->serviceApi);
$this->eventDispatcher->dispatch(HttpClientEvents::HANDLER_STACK, $event); $this->eventDispatcher->dispatch(HttpClientEvents::HANDLER_STACK, $event);
return $config; return $config;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment