Update StartWebSocketServer.php

This commit is contained in:
Pascal Baljet 2018-12-05 14:56:01 +01:00
parent dc994c754e
commit 5f4a91ab5b
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ use BeyondCode\LaravelWebSockets\Statistics\Logger\StatisticsLogger as Statistic
class StartWebSocketServer extends Command class StartWebSocketServer extends Command
{ {
protected $signature = 'websockets:serve {--host=0.0.0.0} {--port=6001} '; protected $signature = 'websockets:serve {--host=0.0.0.0} {--port=6001} {--debug : Forces the HttpLogger to be enabled and thereby overrides the app.debug config setting } ';
protected $description = 'Start the Laravel WebSocket Server'; protected $description = 'Start the Laravel WebSocket Server';
@ -67,7 +67,7 @@ class StartWebSocketServer extends Command
{ {
app()->singleton(HttpLogger::class, function () { app()->singleton(HttpLogger::class, function () {
return (new HttpLogger($this->output)) return (new HttpLogger($this->output))
->enable(config('app.debug')) ->enable($this->option('debug') ?: config('app.debug'))
->verbose($this->output->isVerbose()); ->verbose($this->output->isVerbose());
}); });
@ -78,7 +78,7 @@ class StartWebSocketServer extends Command
{ {
app()->singleton(WebsocketsLogger::class, function () { app()->singleton(WebsocketsLogger::class, function () {
return (new WebsocketsLogger($this->output)) return (new WebsocketsLogger($this->output))
->enable(config('app.debug')) ->enable($this->option('debug') ?: config('app.debug'))
->verbose($this->output->isVerbose()); ->verbose($this->output->isVerbose());
}); });