PHPackages                             elastic/ecs-logging - 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. elastic/ecs-logging

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

elastic/ecs-logging
===================

Format and enrich your log files in the elastic common schema

2.0.0(2y ago)21907.5k↓20.7%40[9 issues](https://github.com/elastic/ecs-logging-php/issues)[13 PRs](https://github.com/elastic/ecs-logging-php/pulls)1Apache-2.0PHPPHP &gt;=8.1CI passing

Since Oct 30Pushed 2mo ago17 watchersCompare

[ Source](https://github.com/elastic/ecs-logging-php)[ Packagist](https://packagist.org/packages/elastic/ecs-logging)[ Docs](https://www.elastic.co/guide/en/ecs/)[ RSS](/packages/elastic-ecs-logging/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (18)Used By (1)

[![Build Status](https://camo.githubusercontent.com/4a6c56ba8ba2cda7044479c3a43f9b2dd7f4a6ef7590a291014a454746c512e0/68747470733a2f2f61706d2d63692e656c61737469632e636f2f6275696c645374617475732f69636f6e3f6a6f623d61706d2d6167656e742d7068702532466563732d6c6f6767696e672d7068702d6d62702532466d61696e)](https://apm-ci.elastic.co/job/apm-agent-php/job/ecs-logging-php-mbp/job/main/)

ECS Logging for PHP
===================

[](#ecs-logging-for-php)

Transform your application logs to structured logs that comply with the [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html). In combination with [Filebeat](https://www.elastic.co/products/beats/filebeat), send your logs directly to Elasticsearch and leverage [Kibana's Logs app](https://www.elastic.co/guide/en/observability/current/monitor-logs.html) to inspect all of your logs in a single place. This provides more observability for your PHP applications, for example, by correlating your logs with APM traces.

See the [PHP ECS logging documentation](https://www.elastic.co/guide/en/ecs-logging/php/current/intro.html) to get started, or the [ecs-logging repo](https://github.com/elastic/ecs-logging) for other ECS logging libraries and more resources about ECS &amp; logging.

---

Install
-------

[](#install)

```
composer require elastic/ecs-logging

```

Examples and Usage
------------------

[](#examples-and-usage)

- [Monolog v3.0](https://github.com/elastic/ecs-logging-php/blob/main/docs/Monolog_v3.md)

Library Support
---------------

[](#library-support)

- Currently only [Monolog:3.\*](https://github.com/Seldaek/monolog) is supported.

References
----------

[](#references)

- [Documentation](https://www.elastic.co/guide/en/ecs-logging/php/current/intro.html)
- Introduction to ECS [blog post](https://www.elastic.co/blog/introducing-the-elastic-common-schema).
- Logs UI [blog post](https://www.elastic.co/blog/infrastructure-and-logs-ui-new-ways-for-ops-to-interact-with-elasticsearch).

Contributing
------------

[](#contributing)

See [contributing documentation](CONTRIBUTING.md).

License
-------

[](#license)

This software is licensed under the [Apache 2 license](https://github.com/elastic/ecs-logging-php/blob/main/LICENSE).

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance49

Moderate activity, may be stable

Popularity51

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~310 days

Recently: every ~386 days

Total

6

Last Release

839d ago

Major Versions

0.0.1 → 1.0.12019-11-07

1.0.3 → 2.0.02024-01-31

PHP version history (3 changes)1.0.0PHP ^7.2

1.0.3PHP ^7.2||^8.0

2.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/75c7c511421feb14316a01d29a7566bd4fdd97147b5a4f3faa5a065f9d0a0193?d=identicon)[ezimuel](/maintainers/ezimuel)

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

![](https://www.gravatar.com/avatar/79a480c40655a7875aa5307621ef686afe9def8efbfae78c9f8bf4c9116d0cb9?d=identicon)[philkra](/maintainers/philkra)

---

Top Contributors

[![philkra](https://avatars.githubusercontent.com/u/35487337?v=4)](https://github.com/philkra "philkra (34 commits)")[![v1v](https://avatars.githubusercontent.com/u/2871786?v=4)](https://github.com/v1v "v1v (23 commits)")[![SergeyKleyman](https://avatars.githubusercontent.com/u/7782093?v=4)](https://github.com/SergeyKleyman "SergeyKleyman (15 commits)")[![reakaleek](https://avatars.githubusercontent.com/u/16325797?v=4)](https://github.com/reakaleek "reakaleek (9 commits)")[![intuibase](https://avatars.githubusercontent.com/u/9551626?v=4)](https://github.com/intuibase "intuibase (3 commits)")[![pimjansen](https://avatars.githubusercontent.com/u/1457219?v=4)](https://github.com/pimjansen "pimjansen (2 commits)")[![bmorelli25](https://avatars.githubusercontent.com/u/5618806?v=4)](https://github.com/bmorelli25 "bmorelli25 (2 commits)")[![obltmachine](https://avatars.githubusercontent.com/u/150269514?v=4)](https://github.com/obltmachine "obltmachine (2 commits)")[![colleenmcginnis](https://avatars.githubusercontent.com/u/10479155?v=4)](https://github.com/colleenmcginnis "colleenmcginnis (2 commits)")[![elastic-observability-automation[bot]](https://avatars.githubusercontent.com/u/6764390?v=4)](https://github.com/elastic-observability-automation[bot] "elastic-observability-automation[bot] (1 commits)")[![segrax](https://avatars.githubusercontent.com/u/1327406?v=4)](https://github.com/segrax "segrax (1 commits)")[![DRoet](https://avatars.githubusercontent.com/u/7842510?v=4)](https://github.com/DRoet "DRoet (1 commits)")[![theletterf](https://avatars.githubusercontent.com/u/1773616?v=4)](https://github.com/theletterf "theletterf (1 commits)")[![thinkspill](https://avatars.githubusercontent.com/u/822133?v=4)](https://github.com/thinkspill "thinkspill (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

ecselastic-common-schemafilebeatloggingmonologmonolog-formatterphplogpsr-3loggingelasticECSfilebeat

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/elastic-ecs-logging/health.svg)

```
[![Health](https://phpackages.com/badges/elastic-ecs-logging/health.svg)](https://phpackages.com/packages/elastic-ecs-logging)
```

###  Alternatives

[monolog/monolog

Sends your logs to files, sockets, inboxes, databases and various web services

21.4k964.9M7.0k](/packages/monolog-monolog)[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[inpsyde/wonolog

Monolog-based logging package for WordPress.

183617.9k7](/packages/inpsyde-wonolog)[hamidrezaniazi/pecs

PHP ECS (Elastic Common Schema): Simplify logging with the power of elastic common schema.

3325.5k1](/packages/hamidrezaniazi-pecs)[apix/log

Minimalist, thin and fast PSR-3 compliant (multi-bucket) logger.

511.0M18](/packages/apix-log)[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2818.1k4](/packages/markrogoyski-simplelog-php)

PHPackages © 2026

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