PHPackages                             tuozhongedu/monolog-elasticsearch-logstashformat - 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. tuozhongedu/monolog-elasticsearch-logstashformat

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

tuozhongedu/monolog-elasticsearch-logstashformat
================================================

Use the logstash formatter with elasticsearch

7.0(3y ago)220.5k—0%1MITPHPPHP ^5.6.6|^7.0

Since Jun 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tuozhongedu/monolog-elasticsearch-logstashformat)[ Packagist](https://packagist.org/packages/tuozhongedu/monolog-elasticsearch-logstashformat)[ Docs](http://github.com/nulpunkt/monolog-elasticsearch-logstashformat)[ RSS](/packages/tuozhongedu-monolog-elasticsearch-logstashformat/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

Elasticsearch with logstash formatter
=====================================

[](#elasticsearch-with-logstash-formatter)

This handler lets you put logs into Elasticsearch in the Logstash format, which makes visualization with Kibana very easy.

Recommended setup
-----------------

[](#recommended-setup)

```
use Elasticsearch\ClientBuilder;
use Monolog\Formatter\LogstashFormatter;
use Monolog\ElasticLogstashHandler;

$client = ClientBuilder::create()->setHosts(
    [
        'http://127.0.0.1:9200'
    ]
)->build();

$formatter = new LogstashFormatter('application', null, null, '', 1);
$handler = new ElasticLogstashHandler($client, ['type' => 'invoicing-logs']);
$handler->setFormatter($formatter);

$log = new Monolog\Logger('invoicing');
$log->pushHandler($handler);
$log->warn('new sale', ['user_id' => 42, 'product_id' => 7537]);
```

Fork from

###  Health Score

33

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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

Every ~787 days

Total

5

Last Release

1144d ago

Major Versions

1.0.1 → 2.02016-10-27

2.0 → 5.02017-01-03

5.0 → 7.02023-02-02

PHP version history (3 changes)1.0.0PHP &gt;=5.3.0

2.0PHP &gt;=5.4.0

5.0PHP ^5.6.6|^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/52f9b730ce98de8e74ed7f2a9e9e9151f50e07893d27bb28e278e70a653736ce?d=identicon)[congpeijun](/maintainers/congpeijun)

---

Top Contributors

[![congpeijun](https://avatars.githubusercontent.com/u/881552?v=4)](https://github.com/congpeijun "congpeijun (3 commits)")[![ivannovak](https://avatars.githubusercontent.com/u/107779?v=4)](https://github.com/ivannovak "ivannovak (1 commits)")[![nulpunkt](https://avatars.githubusercontent.com/u/1875948?v=4)](https://github.com/nulpunkt "nulpunkt (1 commits)")

---

Tags

elasticsearchmonologlogstashkibana

### Embed Badge

![Health badge](/badges/tuozhongedu-monolog-elasticsearch-logstashformat/health.svg)

```
[![Health](https://phpackages.com/badges/tuozhongedu-monolog-elasticsearch-logstashformat/health.svg)](https://phpackages.com/packages/tuozhongedu-monolog-elasticsearch-logstashformat)
```

###  Alternatives

[nulpunkt/monolog-elasticsearch-logstashformat

Use the logstash formatter with elasticsearch

3569.7k](/packages/nulpunkt-monolog-elasticsearch-logstashformat)[maxbanton/cwh

AWS CloudWatch Handler for Monolog library

42515.1M23](/packages/maxbanton-cwh)[phpnexus/cwh

AWS CloudWatch Handler for Monolog library

383.0M6](/packages/phpnexus-cwh)[index0h/yii2-log

Many Yii2 log targets

49203.0k](/packages/index0h-yii2-log)[logtail/monolog-logtail

Logtail handler for Monolog

233.0M2](/packages/logtail-monolog-logtail)[contributte/monolog

Monolog integration into Nette Framework

221.9M6](/packages/contributte-monolog)

PHPackages © 2026

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