Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrneDev committed Aug 20, 2020
1 parent 3e31f4e commit eebf513
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Provider/AppProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Illuminate\Contracts\Config\Repository;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
use Psr\Log\LoggerInterface;
use Pusher\Pusher;


Expand Down Expand Up @@ -167,6 +168,8 @@ protected function pusher()
$encrypted = false;
}

$options['debug'] = $this->app->inDebugMode();

if ($cluster = $settings->get('kyrne-websocket.app_cluster')) {
$options['cluster'] = $cluster;
} else {
Expand All @@ -176,14 +179,20 @@ protected function pusher()
$options['scheme'] = $encrypted ? 'https' : 'http';
}

return new Pusher(
$pusher = new Pusher(
$settings->get('kyrne-websocket.app_key'),
$settings->get('kyrne-websocket.app_secret'),
$settings->get('kyrne-websocket.app_id'),
$options,
$host,
$port
);

if ($this->app->inDebugMode()) {
$pusher->setLogger(app('log'));
}

return $pusher;
});

$this->app->alias(Pusher::class, 'websocket.pusher');
Expand Down

0 comments on commit eebf513

Please sign in to comment.