set('logging.default', 'stack'); $app['config']->set('logging.channels.loghandler', [ 'driver' => 'loghandler', 'level' => 'debug', 'bubble' => true, ]); $app['config']->set('logging.channels.single', [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), 'level' => 'debug', 'replace_placeholders' => true, ]); $app['config']->set('logging.channels.stack', [ 'driver' => 'stack', 'channels' => ['single', 'loghandler'], 'ignore_exceptions' => false, ]); $app['config']->set('loghandler', [ 'endpoint' => 'http://test.example/api/error/create', 'token' => 'test-token', 'source' => 'Project Name', 'enabled' => true, 'timeout_ms' => 3000, 'retry_times' => 0, 'include_trace' => false, ]); } protected function tearDown(): void { parent::tearDown(); Log::forgetChannel('loghandler'); Log::forgetChannel('stack'); } }