Log Laravel queue worker lifecycle events to a dedicated queue log channel.
| Package | PHP | Laravel |
|---|---|---|
2.x |
8.2+ |
12.x / 13.x |
Notes:
- Laravel 12 supports PHP
8.2through8.5. - Laravel 13 requires PHP
8.3+, so PHP8.2is only valid with Laravel 12.
JobProcessingatinfoJobProcessedatinfoJobQueuedatinfoJobExceptionOccurredaterrorJobReleasedAfterExceptionatwarningJobFailedaterrorJobTimedOutaterrorLoopingatdebugQueueBusyatwarningQueueFailedOveraterrorQueuePausedatinfoQueueResumedatinfoWorkerStartingatinfoWorkerStoppingatinfo
composer require larawelders/queue-event-loggerThe package uses Laravel package discovery, so no manual provider registration is required.
The package registers a default queue log channel at runtime if your application does not already define one. By default, it uses a daily channel that writes to date-named files under storage/logs/queue.log.
If you want to customize the channel name or logger configuration, publish the package config:
php artisan vendor:publish --tag=queue-event-logger-configThe published config lets you change both the channel name and the underlying channel definition:
'channel' => 'queue',
'channel_config' => [
'driver' => 'daily',
'path' => storage_path('logs/queue.log'),
'level' => 'debug',
],If your application already defines a channel with the configured name in config/logging.php, the application definition takes precedence:
'channels' => [
'queue' => [
'driver' => 'single',
'path' => storage_path('logs/app-queue.log'),
'level' => 'info',
],
],[8f4d4f2e] Processing job App\Jobs\ProcessWebhook
[8f4d4f2e] Processed job App\Jobs\ProcessWebhook
[8f4d4f2e] Queued job App\Jobs\ProcessWebhook on queue webhooks with delay 30
[8f4d4f2e] Uncaught exception RuntimeException in job App\Jobs\ProcessWebhook: API timeout
[8f4d4f2e] Released job after exception App\Jobs\ProcessWebhook with backoff 30
[8f4d4f2e] Job failed RuntimeException in job App\Jobs\ProcessWebhook: API timeout
[8f4d4f2e] Timed out job App\Jobs\ProcessWebhook
[worker] Looping
[worker] Queue webhooks on connection redis is busy with 250 pending jobs
[worker] Queue failover from connection redis for job App\Jobs\ProcessWebhook after RuntimeException: Redis down
[worker] Paused queue webhooks on connection redis for 60
[worker] Resumed queue webhooks on connection redis
[worker] Starting connection redis on queue webhooks
[worker] Stopping with status 0
composer install
composer run test
composer run analyse