Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Support for forcing debug mode #18

Merged
merged 2 commits into from
Dec 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Console/StartWebSocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

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';

Expand Down Expand Up @@ -67,7 +67,7 @@ protected function configureHttpLogger()
{
app()->singleton(HttpLogger::class, function () {
return (new HttpLogger($this->output))
->enable(config('app.debug'))
->enable($this->option('debug') ?: config('app.debug'))
->verbose($this->output->isVerbose());
});

Expand All @@ -78,7 +78,7 @@ protected function configureMessageLogger()
{
app()->singleton(WebsocketsLogger::class, function () {
return (new WebsocketsLogger($this->output))
->enable(config('app.debug'))
->enable($this->option('debug') ?: config('app.debug'))
->verbose($this->output->isVerbose());
});

Expand Down