-
Notifications
You must be signed in to change notification settings - Fork 638
Description
Telescope Version
5.15
Laravel Version
11.44
PHP Version
8.3.27
Database Driver & Version
MySql
Description
I followed the installation instructions for Telescope as outlined here
https://laravel.com/docs/11.x/telescope#installation
I didn't go for the local, I just went for the Production one. I made sure I enabled the JobWatcher
Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', true),
I ran jobs and it's not getting logged.
If I put the following in TelescopeServiceProvider.php
Telescope::startRecording();
It starts to log. But it is not mentioned in anywhere in the documentation, and I don't want to do something that is not supposed to be done.
Steps To Reproduce
php artisan make:job TelescopeDebugJob
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
class TelescopeDebugJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Execute the job.
*/
public function handle(): void
{
Log::info('TelescopeDebugJob ran at ' . now());
}
}
Add the following in route/web.php
Route::get('/telescope-job-test', function () {
TelescopeDebugJob::dispatch(Str::uuid()->toString());
return 'Dispatched TelescopeDebugJob';
});
Go to
http://localhost:8000/telescope-job-test
Now go to
http://localhost:8000/telescope
You will notice that the job is not logged, unless you force it to start recording