diff --git a/config/ignition.php b/config/ignition.php index 4cc53e45..a4fe3ce6 100644 --- a/config/ignition.php +++ b/config/ignition.php @@ -3,6 +3,10 @@ use Spatie\Ignition\Solutions\SolutionProviders\BadMethodCallSolutionProvider; use Spatie\Ignition\Solutions\SolutionProviders\MergeConflictSolutionProvider; use Spatie\Ignition\Solutions\SolutionProviders\UndefinedPropertySolutionProvider; +use Spatie\LaravelIgnition\Recorders\DumpRecorder\DumpRecorder; +use Spatie\LaravelIgnition\Recorders\JobRecorder\JobRecorder; +use Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder; +use Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder; use Spatie\LaravelIgnition\Solutions\SolutionProviders\DefaultDbNameSolutionProvider; use Spatie\LaravelIgnition\Solutions\SolutionProviders\GenericLaravelExceptionSolutionProvider; use Spatie\LaravelIgnition\Solutions\SolutionProviders\IncorrectValetDbCredentialsSolutionProvider; @@ -211,4 +215,20 @@ 'settings_file_path' => '', + /* + |-------------------------------------------------------------------------- + | Recorders + |-------------------------------------------------------------------------- + | + | Ignition registers a couple of recorders when it is enabled. Below you may + | specify a recorders will be used to record specific events. + | + */ + + 'recorders' => [ + DumpRecorder::class, + JobRecorder::class, + LogRecorder::class, + QueryRecorder::class + ] ]; diff --git a/src/IgnitionServiceProvider.php b/src/IgnitionServiceProvider.php index b0c305e5..d19c442f 100644 --- a/src/IgnitionServiceProvider.php +++ b/src/IgnitionServiceProvider.php @@ -244,15 +244,9 @@ protected function registerLogHandler(): void protected function startRecorders(): void { - // TODO: Ignition feature toggles - - $this->app->make(DumpRecorder::class)->start(); - - $this->app->make(LogRecorder::class)->start(); - - $this->app->make(QueryRecorder::class)->start(); - - $this->app->make(JobRecorder::class)->start(); + foreach ($this->app->config['ignition.recorders'] as $recorder) { + $this->app->make($recorder)->start(); + } } protected function configureQueue(): void