Merge pull request #18 from pascalbaljet/master

Support for forcing debug mode
This commit is contained in:
Marcel Pociot 2018-12-05 21:14:17 +01:00 committed by GitHub
commit 76e091d1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 loggers to be enabled and thereby overriding the app.debug config setting } ';
protected $description = 'Start the Laravel WebSocket Server'; protected $description = 'Start the Laravel WebSocket Server';
@ -71,7 +71,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());
}); });
@ -82,7 +82,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());
}); });