New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

dskripchenko/laravel-delayed-log

Delayed logging.
3,028
Install
composer require dskripchenko/laravel-delayed-log
Latest Version:1.1.1
PHP:^8.2
Laravel:11 · 12 · 13
Older releases:10
License:MIT
Last Updated:Aug 6, 2026
Links: GitHub  ·  Packagist
Maintainer: dskripchenko

laravel-delayed-log

Asynchronous logging for Laravel. Log records are pushed onto a queue and written by a job instead of blocking the request — useful when your log target is slow (HTTP log sinks, external aggregators, etc.).

🌐 English · Deutsch · Русский · 中文

Packagist License

Requirements

PHP 8.2–8.5 · Laravel 11 / 12 / 13.

Install

composer require dskripchenko/laravel-delayed-log

The service provider is auto-discovered and merges a delayed log channel into your config/logging.php.

Usage

Point a channel (or your default LOG_CHANNEL) at delayed:

LOG_CHANNEL=delayed

# The channel the records are ultimately written to (default: stack)
LOG_DELAYED_CHANNEL=stack
# The queue the write job is dispatched on (default: delayed_log)
LOG_DELAYED_QUEUE=delayed_log
use Illuminate\Support\Facades\Log;

Log::channel('delayed')->info('Handled without blocking the request', ['user' => $id]);

Each record is dispatched as a DelayedLogJob onto LOG_DELAYED_QUEUE; a queue worker then writes it to the underlying LOG_DELAYED_CHANNEL. Make sure a worker is processing that queue:

php artisan queue:work --queue=delayed_log

How it works

The package registers a custom delayed channel whose Monolog handler (DelayedLogHandler) serializes each record and dispatches DelayedLogJob. The job re-emits the record on the real target channel from a worker process, so the originating request never waits on the log write.

License

MIT © Denis Skripchenko

Related Packages

webmachine/logs

Logs for Laravel 5

399 0
metalcoder/logsifier

Package to manage application logs

29 0
aryehraber/statamic-logbook

Manage and view log files in the CP.

238,840 9
aaronheath/class-logger

Simple logging helper trait for use within Laravel classes.

7,556 0
rockbuzz/lara-activities

Lara Activities is a package that monitors activities for creating, editing, and...

5,249 2

Version History

Version Released PHP Laravel License
1.1.1 ^8.2 ^11.0 || ^12.0 || ^13.0 MIT
1.1.0 ^8.2 ^11.0 || ^12.0 || ^13.0 MIT
1.0.7 ^8.2 10.*|11.*|12.* MIT
1.0.6 ^8.2 10.*|11.* MIT
1.0.5 ^8.2 10.* MIT