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

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

nicicalu/ecs-logging
====================

Format and enrich your log files in the elastic common schema

013PHP

Since Sep 24Pushed 3y agoCompare

[ Source](https://github.com/Nicicalu/ecs-logging-php)[ Packagist](https://packagist.org/packages/nicicalu/ecs-logging)[ RSS](/packages/nicicalu-ecs-logging/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![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 v2.0](https://github.com/elastic/ecs-logging-php/blob/main/docs/Monolog_v2.md)

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

[](#library-support)

- Currently only [Monolog:2.\*](https://github.com/Seldaek/monolog) is supported.
- The major version of this library is compatible with the major version of ECS.

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

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![philkra](https://avatars.githubusercontent.com/u/35487337?v=4)](https://github.com/philkra "philkra (34 commits)")[![SergeyKleyman](https://avatars.githubusercontent.com/u/7782093?v=4)](https://github.com/SergeyKleyman "SergeyKleyman (14 commits)")[![v1v](https://avatars.githubusercontent.com/u/2871786?v=4)](https://github.com/v1v "v1v (11 commits)")[![Nicicalu](https://avatars.githubusercontent.com/u/52490746?v=4)](https://github.com/Nicicalu "Nicicalu (4 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)")[![thinkspill](https://avatars.githubusercontent.com/u/822133?v=4)](https://github.com/thinkspill "thinkspill (1 commits)")[![DRoet](https://avatars.githubusercontent.com/u/7842510?v=4)](https://github.com/DRoet "DRoet (1 commits)")

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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