Skip to content

Commit

Permalink
Re-do: Configurable Roadrunner log level (#604)
Browse files Browse the repository at this point in the history
* Made RR log level configurable

* formatting

* Fixed subtle operator precedence bug

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
ejulen and taylorotwell authored Oct 26, 2022
1 parent 42deee4 commit 82a5b68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Commands/StartRoadRunnerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class StartRoadRunnerCommand extends Command implements SignalableCommandInterfa
{--max-requests=500 : The number of requests to process before reloading the server}
{--rr-config= : The path to the RoadRunner .rr.yaml file}
{--watch : Automatically reload the server when the application is modified}
{--poll : Use file system polling while watching in order to watch files over a network}';
{--poll : Use file system polling while watching in order to watch files over a network}
{--log-level= : Log messages at or above the specified log level}';

/**
* The command's description.
Expand Down Expand Up @@ -87,7 +88,7 @@ public function handle(ServerProcessInspector $inspector, ServerStateFile $serve
'-o', 'http.static.dir='.base_path('public'),
'-o', 'http.middleware='.config('octane.roadrunner.http_middleware', 'static'),
'-o', 'logs.mode=production',
'-o', app()->environment('local') ? 'logs.level=debug' : 'logs.level=warn',
'-o', 'logs.level='.($this->option('log-level') ?: (app()->environment('local') ? 'debug' : 'warn')),
'-o', 'logs.output=stdout',
'-o', 'logs.encoding=json',
'serve',
Expand Down

0 comments on commit 82a5b68

Please sign in to comment.