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. lezhnev74/monolog-async-handler

ActiveLibrary

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 64% 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

3752d 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

[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k4](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[drevops/git-artifact

Package artifact from your codebase in CI and push it to a separate git repo.

2133.2k](/packages/drevops-git-artifact)[doppar/framework

The Doppar Framework

366.7k8](/packages/doppar-framework)

PHPackages © 2026

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