PHPackages                             lezhnev74/monolog-async-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. lezhnev74/monolog-async-handler

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

lezhnev74/monolog-async-handler
===============================

Sends monolog notifications via given closure

1.0(10y ago)56.4k1MITPHPPHP &gt;=5.3.0CI failing

Since Jan 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/lezhnev74/monologAsyncHandler)[ Packagist](https://packagist.org/packages/lezhnev74/monolog-async-handler)[ RSS](/packages/lezhnev74-monolog-async-handler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

MonologAsyncHandler
===================

[](#monologasynchandler)

![Packagist](https://camo.githubusercontent.com/478a698dac14d0ca94e2d3af97ef4bfe96d585b5f7d2cec763d35252ee30aea9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c657a686e657637342f6d6f6e6f6c6f672d6173796e632d68616e646c65722e737667)[![Build Status](https://camo.githubusercontent.com/469fb4f450907c119044c6ca95d8893c84890f79d1b586ebb197a7f97157402b/68747470733a2f2f7472617669732d63692e6f72672f6c657a686e657637342f6d6f6e6f6c6f674173796e6348616e646c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lezhnev74/monologAsyncHandler)[![Total Downloads](https://camo.githubusercontent.com/cfe4c2780dc4e4d33dde17e627f44229c231354c9f04ec0bf076aea8809d1fc4/68747470733a2f2f706f7365722e707567782e6f72672f6c657a686e657637342f6d6f6e6f6c6f672d6173796e632d68616e646c65722f646f776e6c6f616473)](https://packagist.org/packages/lezhnev74/monolog-async-handler)

Handler for monolog to handle log writing through closure. Inside the closure you can set pushing to queues.

Example usage
-------------

[](#example-usage)

```
use lezhnev74\Monolog\Handler\ClosureHandler;
use Monolog\Logger;

$handler = new ClosureHandler(function ($record) {
    // put your data to queue
    // or any other logic goes here that detaches the logging from life circle

    /*
    the $record contains:

    [
        "message"    => "the message goes here",
        "context"    => ["platform" => "ios"], // context
        "level"      => 200,
        "level_name" => "INFO",
        "channel"    => "local",
        "datetime"   => "",
        "extra"      => [],
        "formatted"  => "[2016-01-30 15:41:37] local.INFO: FORMATTED MESSAGE GOES HERE []\n",
    ]
    */
});
$monolog = new Logger('async_logger');
$monolog->pushHandler($handler);
```

Installation
------------

[](#installation)

```
composer require lezhnev74/monolog-async-handler

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3804d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb00f0fc4db7dc06ce8ef99d6fd623780a3d52608c61c45fbaed0f8cf1ab5810?d=identicon)[lezhnev74](/maintainers/lezhnev74)

---

Top Contributors

[![lezhnev74](https://avatars.githubusercontent.com/u/10206110?v=4)](https://github.com/lezhnev74 "lezhnev74 (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lezhnev74-monolog-async-handler/health.svg)

```
[![Health](https://phpackages.com/badges/lezhnev74-monolog-async-handler/health.svg)](https://phpackages.com/packages/lezhnev74-monolog-async-handler)
```

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k198.8M328](/packages/symfony-monolog-bridge)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[illuminate/log

The Illuminate Log package.

6225.0M603](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[grkamil/laravel-telegram-logging

Send logs to Telegram chat via Telegram bot

161493.0k](/packages/grkamil-laravel-telegram-logging)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
