PHPackages                             myli/laravel-datadog-logger - 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. myli/laravel-datadog-logger

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

myli/laravel-datadog-logger
===========================

Custom laravel monolog logger for datadog logs management, both api and agent ways

v1.1.1(2y ago)1054.6k↑350%10[1 issues](https://github.com/myLocalInfluence/laravel-datadog-logger/issues)MITPHPPHP &gt;=7.1CI failing

Since Aug 14Pushed 2y ago10 watchersCompare

[ Source](https://github.com/myLocalInfluence/laravel-datadog-logger)[ Packagist](https://packagist.org/packages/myli/laravel-datadog-logger)[ Docs](https://github.com/myLocalInfluence/laravel-datadog-logger)[ RSS](/packages/myli-laravel-datadog-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (21)Used By (0)

[![](https://camo.githubusercontent.com/640c3d52b2764f179ef3cf089b604516a8c4ac0a06f055a46c6a7fce9428b787/68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667)](https://laravel.com)

X

[![](https://camo.githubusercontent.com/74c53f32f1f7d5050eb227fe7551053e8e44afe72543bccab5d6d4d426b8fcf2/68747470733a2f2f696d6769782e64617461646f6768712e636f6d2f696d672f64645f6c6f676f5f37307837352e706e673f666d3d706e67266175746f3d666f726d6174266c6f73736c6573733d31253232)](https://www.datadoghq.com)

[![Build Status](https://camo.githubusercontent.com/decff0c1255ff3fcdc81f59846a3946a28e90084f1cefbb2196b2b4206b2fae5/68747470733a2f2f7472617669732d63692e6f72672f6d794c6f63616c496e666c75656e63652f6c61726176656c2d64617461646f672d6c6f676765722e737667)](https://travis-ci.org/myLocalInfluence/laravel-datadog-logger)[![](https://camo.githubusercontent.com/3913a31018f738795e7cb58cca9c37f384224be77057c989ad1d3e69997ae861/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35636537336566326465356664656265656533392f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/myLocalInfluence/laravel-datadog-logger/maintainability)[![](https://camo.githubusercontent.com/0a91f9c8fdbd4be467629adc78ca00da8488d12c53bd777d0cecce670f7f664a/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35636537336566326465356664656265656533392f746573745f636f766572616765)](https://codeclimate.com/github/myLocalInfluence/laravel-datadog-logger/test_coverage)[![GitHub release](https://camo.githubusercontent.com/91b06711477853cd2f92981db438ae0d7c8a0476c439f614b58600b693797930/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d794c6f63616c496e666c75656e63652f6c61726176656c2d64617461646f672d6c6f67676572)](https://camo.githubusercontent.com/91b06711477853cd2f92981db438ae0d7c8a0476c439f614b58600b693797930/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d794c6f63616c496e666c75656e63652f6c61726176656c2d64617461646f672d6c6f67676572)[![Total Downloads](https://camo.githubusercontent.com/bfc2799b5b636ede14c92d639e2300cd9455f23e21eef9cffa6d64d08ca37f27/68747470733a2f2f706f7365722e707567782e6f72672f6d796c692f6c61726176656c2d64617461646f672d6c6f676765722f642f746f74616c2e737667)](https://packagist.org/packages/myli/laravel-datadog-logger)[![License](https://camo.githubusercontent.com/acdac34d7bcbc2149e5ebbbb78b5ee75a8546f07e4b93217df6a0fb3e3d7c09a/68747470733a2f2f706f7365722e707567782e6f72672f6d796c692f6c61726176656c2d64617461646f672d6c6f676765722f6c6963656e73652e737667)](https://packagist.org/packages/myli/laravel-datadog-logger)

Getting started
===============

[](#getting-started)

Simply launch this command in your root laravel project :

`composer require myli/laravel-datadog-logger`

I would highly suggest you to use the DataDog Agent Style rather than the Api Style because one laravel log = one api call which is bad for performances.

1) How to use in DataDog Agent Style (Example for an ubuntu installation)
-------------------------------------------------------------------------

[](#1-how-to-use-in-datadog-agent-style-example-for-an-ubuntu-installation)

1. Firstly, install the agent by [following this guide here](https://app.datadoghq.com/account/settings#agent)
2. Please fill in your .env the following values:

    ```
    DATADOG_STORAGE_PATH="logs/laravel-json-datadog.log"
    DATADOG_PERMISSIONS=0644 // Default to 0644 if no value provided
    DATADOG_LEVEL="info" // Default to info if no value provided
    DATADOG_BUBBLE=true // Default to true if no value provided

    ```
3. Add `LOG_CHANNEL="datadog-agent"` in your `.env` file OR include `datadog-agent` channel into your stack log channel.
4. Enable logs by setting `logs_enabled: true` in the default `/etc/datadog-agent/datadog.yaml` file on the server where the project is hosted.
5. Choose only one config between those 3 files to put in `/etc/datadog-agent/conf.d/laravel.d/` (create the `laravel.d` folder if it doesn't exist) :

    1. [Logging only php-cli](https://github.com/myLocalInfluence/laravel-datadog-logger/blob/master/config/agent/cli-only/conf.yaml)
    2. [Logging only php-fpm](https://github.com/myLocalInfluence/laravel-datadog-logger/blob/master/config/agent/fpm-only/conf.yaml)
    3. [Logging php-fpm and php-cli](https://github.com/myLocalInfluence/laravel-datadog-logger/blob/master/config/agent/cli-fpm/conf.yaml)
6. Restart your DataDog Agent and watch your result [here](https://app.datadoghq.com/logs/livetail).

Notes: At this time the `source` metadata from the DataDogFormatter is not taken care by DataDog so that's why we are specifying it in the `/etc/datadog-agent/conf.d/laravel.d/conf.yaml` file.

2) How to use in API Style
--------------------------

[](#2-how-to-use-in-api-style)

1. Please fill in your .env the following values ([How to obtain ApiKey ?](https://app.datadoghq.com/account/settings#api)) :

`DATADOG_API_KEY="YOUR_API_KEY" DATADOG_REGION="eu|us" // Default to eu if no value provided DATADOG_LEVEL="info" // Default to info if no value provided DATADOG_BUBBLE=true // Default to true if no value provided`

2. And finally add `LOG_CHANNEL="datadog-api"` in your `.env` file OR include `datadog-api` channel into your stack log channel.

If you ❤️ open-source software, give the repos you use a ⭐️.
------------------------------------------------------------

[](#if-you-️-open-source-software-give-the-repos-you-use-a-️)

We have included the awesome `symfony/thanks` composer package as a dev dependency. Let your OS package maintainers know you appreciate them by starring the packages you use. Simply run composer thanks after installing this package. (And not to worry, since it's a dev-dependency it won't be installed in your live environment.)

License
-------

[](#license)

The Laravel DataDog Logger is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Repository proudly created by

[![](https://camo.githubusercontent.com/27bde085cc85be541b4904254a7ebb68ab309f7ce988cc742185f9ca56241267/68747470733a2f2f7777772e6d796c692e696f2f77702d636f6e74656e742f75706c6f6164732f323031362f31322f4c4f474f2d4d594c492e706e67)](https://www.myli.io)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

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

###  Release Activity

Cadence

Every ~140 days

Recently: every ~341 days

Total

11

Last Release

1065d ago

Major Versions

v0.3.0 → 1.02020-11-03

PHP version history (2 changes)v0.1.0PHP &gt;=7.1

1.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/9319a229eb408186e3c4d787d82bbd6192deb0643c9fd4cc4ad8519714bce1e1?d=identicon)[kangoo13](/maintainers/kangoo13)

---

Top Contributors

[![kangoo13](https://avatars.githubusercontent.com/u/9050016?v=4)](https://github.com/kangoo13 "kangoo13 (40 commits)")[![thixpin](https://avatars.githubusercontent.com/u/6492082?v=4)](https://github.com/thixpin "thixpin (2 commits)")

---

Tags

logphpformatterapilaravelDataDoghandlerAgentloggermanagementmonologdatadogagentdatadoglogdatadog-logger

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/myli-laravel-datadog-logger/health.svg)

```
[![Health](https://phpackages.com/badges/myli-laravel-datadog-logger/health.svg)](https://phpackages.com/packages/myli-laravel-datadog-logger)
```

###  Alternatives

[logtail/monolog-logtail

Logtail handler for Monolog

233.2M3](/packages/logtail-monolog-logtail)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[yzen.dev/mono-processor

This Processor will display in the logs bread crumbs by which you can more quickly and accurately identify the cause of the error.

116.1k](/packages/yzendev-mono-processor)[ucan-lab/laravel-blink-logger

Comprehensive Logging Tool for Laravel.

126.1k](/packages/ucan-lab-laravel-blink-logger)

PHPackages © 2026

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