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

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

elastic-php/ecs-logging-psr3
============================

Format and enrich your log files in the elastic common schema with psr/log3 support

v1.0.1(2y ago)08.8k↓44.1%Apache-2.0PHPPHP ^8.0

Since Oct 25Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (3)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-php/ecs-logging-psr3

```

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

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

935d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/61018611?v=4)[krobelius](/maintainers/krobelius)[@Krobelius](https://github.com/Krobelius)

---

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 (15 commits)")[![v1v](https://avatars.githubusercontent.com/u/2871786?v=4)](https://github.com/v1v "v1v (13 commits)")[![reakaleek](https://avatars.githubusercontent.com/u/16325797?v=4)](https://github.com/reakaleek "reakaleek (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)")[![Krobelius](https://avatars.githubusercontent.com/u/61018611?v=4)](https://github.com/Krobelius "Krobelius (1 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)")

---

Tags

logpsr-3loggingelasticECSfilebeat

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[monolog/monolog

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

21.4k964.9M7.0k](/packages/monolog-monolog)[elastic/ecs-logging

Format and enrich your log files in the elastic common schema

21907.5k1](/packages/elastic-ecs-logging)[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)

PHPackages © 2026

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