PHPackages                             mondospedizioni/monolog-logtail - 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. mondospedizioni/monolog-logtail

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

mondospedizioni/monolog-logtail
===============================

Logtail handler for Monolog 3

01.6k↑91.7%2PHP

Since Jan 18Pushed 2y agoCompare

[ Source](https://github.com/mondospedizioni/monolog-logtail)[ Packagist](https://packagist.org/packages/mondospedizioni/monolog-logtail)[ RSS](/packages/mondospedizioni-monolog-logtail/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Logtail - PHP Logging Made Easy
===============================

[](#logtail---php-logging-made-easy)

[![Logtail dashboard](https://user-images.githubusercontent.com/19272921/154085622-59997d5a-3f91-4bc9-a815-3b8ead16d28d.jpeg)](https://betterstack.com/logtail)

[![License: ISC](https://camo.githubusercontent.com/8b10d8a5d16abbcc140073e9e3cdc080eaa2d52bc9838914f3e75ec4338e1c2a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4953432d626c75652e737667)](LICENSE.md) [![Unit tests](https://github.com/logtail/logtail-php/actions/workflows/main.yml/badge.svg)](https://github.com/logtail/logtail-php/actions/workflows/main.yml/badge.svg)[![PHP version](https://camo.githubusercontent.com/f82a536dacd31e92c6bff3423c09a940a5fd95d8220d2a5d48b29b674d7d7632/68747470733a2f2f62616467652e667572792e696f2f70682f6c6f677461696c2532466d6f6e6f6c6f672d6c6f677461696c2e737667)](https://badge.fury.io/ph/logtail%2Fmonolog-logtail)

Collect logs from your PHP projects, including Laravel, Symfony, CodeIgniter, CakePHP, Zend, and more.

[Logtail](https://betterstack.com/logtail) is a hosted service that centralizes all of your logs into one place. Allowing for analysis, correlation and filtering with SQL. Actionable Grafana dashboards and collaboration come built-in. Logtail works with [any language or platform and any data source](https://docs.logtail.com/).

### Features

[](#features)

- Simple integration. Built on well-known Monolog logging library.
- Support for structured logging and events.
- Automatically captures useful context.
- Performant, light weight, with a thoughtful design.

### Supported language versions

[](#supported-language-versions)

- PHP 8 or newer
- Composer 1.10.1 or newer

Installation
============

[](#installation)

Install the Logtail Monolog library using composer:

```
composer require logtail/monolog-logtail
```

---

Example project
===============

[](#example-project)

To help you get started with using Logtail in your PHP projects, we have prepared a simple program that showcases the usage of Logtail logger.

Download and install the example project
----------------------------------------

[](#download-and-install-the-example-project)

You can download the [example project](https://github.com/logtail/monolog-logtail/tree/master/example-project) from GitHub directly or you can clone it to a select directory. In that directory, run the following command:

```
composer update
```

This command will install all dependencies from `composer.json` file and lock them in `composer.lock` file.

Run the example project
-----------------------

[](#run-the-example-project)

To run the example application, simply run the following command:

```
php index.php
```

*Don't forget to replace `` with your actual source token which you can find by going to logtail.com -&gt; sources -&gt; edit.*

You should see the following output:

```
All done, you can check your logs in the control panel.

```

This will create and send a total of 8 log messages to the Logtail. Each message corresponds to a specific log level. Detail explanation follows below.

Explore how example project works
---------------------------------

[](#explore-how-example-project-works)

Learn how to setup PHP logging by exploring the workings of the [example project](https://github.com/logtail/monolog-logtail/tree/master/example-project) in detail.

Improved performance with batches
---------------------------------

[](#improved-performance-with-batches)

We extend `Monolog\Handler\BufferHandler` to send your logs periodically in batches for optimized network traffic by default. If you don't want to use batches or you want to use your own buffer handler, use `SynchronousLogtailHandler` instead.

---

Get in touch
------------

[](#get-in-touch)

Have any questions? Please explore the Logtail [documentation](https://docs.logtail.com/) or contact our [support](https://betterstack.com/help).

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

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/16e144c257874e96bc3df675aef3e2d871b2efa339488ddba396b390e1441a6a?d=identicon)[bsramin](/maintainers/bsramin)

---

Top Contributors

[![simonrozsival](https://avatars.githubusercontent.com/u/374616?v=4)](https://github.com/simonrozsival "simonrozsival (13 commits)")[![JendaTovarys](https://avatars.githubusercontent.com/u/19272921?v=4)](https://github.com/JendaTovarys "JendaTovarys (9 commits)")[![SiMoSiMo2](https://avatars.githubusercontent.com/u/3510616?v=4)](https://github.com/SiMoSiMo2 "SiMoSiMo2 (7 commits)")[![gyfis](https://avatars.githubusercontent.com/u/1632140?v=4)](https://github.com/gyfis "gyfis (4 commits)")[![jindraregal](https://avatars.githubusercontent.com/u/4135505?v=4)](https://github.com/jindraregal "jindraregal (3 commits)")[![pizzot](https://avatars.githubusercontent.com/u/15017593?v=4)](https://github.com/pizzot "pizzot (2 commits)")[![bsramin](https://avatars.githubusercontent.com/u/672932?v=4)](https://github.com/bsramin "bsramin (1 commits)")

### Embed Badge

![Health badge](/badges/mondospedizioni-monolog-logtail/health.svg)

```
[![Health](https://phpackages.com/badges/mondospedizioni-monolog-logtail/health.svg)](https://phpackages.com/packages/mondospedizioni-monolog-logtail)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

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