Merge pull request #18 from pascalbaljet/master
Support for forcing debug mode
This commit is contained in:
commit
76e091d1a3
|
|
@ -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());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue