PHPackages                             lyal/monolog-logdna - 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. lyal/monolog-logdna

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

lyal/monolog-logdna
===================

An MIT-licensed package to add LogDNA support to Monolog

1801PHP

Since Dec 22Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

monolog-logdna
==============

[](#monolog-logdna)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cb3d665b3ae23e4ea4e654d93072b160603b3399668f26139f363ef5fb36cc79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c79616c2f6d6f6e6f6c6f672d6c6f67646e612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lyal/monolog-logdna)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/fdc4b396924690cbc7ad768fd075db91b5383790ada11ce2ec809f36da32900d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c79616c2f6d6f6e6f6c6f672d6c6f67646e612f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/lyal/monolog-logdna)[![Coverage Status](https://camo.githubusercontent.com/346351276a5bda6ab389b93241e78ab6c651b5fa800341ad0934097bcabe1e5f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c79616c2f6d6f6e6f6c6f672d6c6f67646e612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/lyal/monolog-logdna/code-structure)[![Quality Score](https://camo.githubusercontent.com/a622048798b8732bf726a6dcd361c5569fa1f336f22565e41db7fd1db5a02261/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c79616c2f6d6f6e6f6c6f672d6c6f67646e612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/lyal/monolog-logdna)[![Total Downloads](https://camo.githubusercontent.com/ae5337854d0e3209e0b55d6bf6a7fe0af6ca74dc152c518865b83d30bdd160ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c79616c2f6d6f6e6f6c6f672d6c6f67646e612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lyal/monolog-logdna)

Install
-------

[](#install)

Via Composer

```
$ composer require lyal/monolog-logdna
```

Usage
-----

[](#usage)

```
$logger = new Logger('general');
$logdnaHandler = new LogDNAHandler('YOUR_API_KEY'); // Can also be passed by env
$logger->pushHandler($logdnaHandler);
$logger->debug('this is my message!');
```

Notes
-----

[](#notes)

Unlike other monolog implementations of json-based log providers, this currently defaults to one request rather than retrying on failure; this will result in a faster request lifecycle and will prevent accidental failure ddosing of LogDNA.

Environment Variables
---------------------

[](#environment-variables)

You can set two environment variables for this library:

*APP\_ENV* -- (string) the environment that the logger is running in

*LOGDNA\_INGESTION\_KEY* -- (string) the ingestion key provided in your LogDNA dasbboard

*LOGDNA\_HOSTNAME* -- (string) the host name of the current environment

*LOGDNA\_HOST\_IP* -- (ip address) the ip address of the currrent environment

*LOGDNA\_API\_URL* -- (url) the base url for your LogDNA service

Testing
-------

[](#testing)

```
phpunit
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Lyal Avery](https://github.com/lyal)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/453899?v=4)[Lyal Avery](/maintainers/lyal)[@lyal](https://github.com/lyal)

---

Top Contributors

[![lyal](https://avatars.githubusercontent.com/u/453899?v=4)](https://github.com/lyal "lyal (9 commits)")

### Embed Badge

![Health badge](/badges/lyal-monolog-logdna/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

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

API for OpenTelemetry PHP.

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

SDK for OpenTelemetry PHP.

2328.5M323](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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