PHPackages                             macerd/laravel-discord-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. macerd/laravel-discord-logger

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

macerd/laravel-discord-logger
=============================

Logging to a discord channel in Laravel

v1.2.1(3y ago)0394MITPHPPHP &gt;=7.3 | ^8.0

Since May 29Pushed 3y agoCompare

[ Source](https://github.com/macerd/laravel-discord-logger)[ Packagist](https://packagist.org/packages/macerd/laravel-discord-logger)[ GitHub Sponsors](https://github.com/vpratfr)[ RSS](/packages/macerd-laravel-discord-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (13)Used By (0)

Laravel Discord Logger
======================

[](#laravel-discord-logger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/68adbe8fd4dee365c03caa0d7f9cbc6e2c1ca8e9ae06f116e05457c38130bcd0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617276696e6c6162732f6c61726176656c2d646973636f72642d6c6f676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marvinlabs/laravel-discord-logger)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/5bb0339dcdb090004d4aeb5761c4a11e69be88553d95bd76da5fe68ee3215a0a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617276696e6c6162732f6c61726176656c2d646973636f72642d6c6f676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marvinlabs/laravel-discord-logger)

`marvinlabs/laravel-discord-logger` is a laravel package providing a logging handler to send logs to a Discord channel.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require marvinlabs/laravel-discord-logger
```

If you are using Laravel 5.5 or later, the service provider will automatically be discovered.

On earlier versions, you need to do that manually. You must install the service provider:

```
// config/app.php
'providers' => [
    ...
    MarvinLabs\DiscordLogger\ServiceProvider::class
];
```

You can then publish the configuration file:

```
php artisan vendor:publish --provider "MarvinLabs\DiscordLogger\ServiceProvider"
```

Setup
-----

[](#setup)

### Prepare the discord channel web hook

[](#prepare-the-discord-channel-web-hook)

Create a discord web hook for the channel which will receive the logs.

### Prepare the logger configuration

[](#prepare-the-logger-configuration)

You must add a new channel to your `config/logging.php` file:

```
// config/logging.php
'channels' => [
    //...
    'discord' => [
        'driver' => 'custom',
        'via'    => MarvinLabs\DiscordLogger\Logger::class,
        'level'  => 'debug',
        'url'    => env('LOG_DISCORD_WEBHOOK_URL'),
    ],
];
```

You can then provide the web-hook URL in your `.env` file:

```
LOG_DISCORD_WEBHOOK_URL=https://discordapp.com/api/webhooks/abcd/1234

```

### Use the logger channel

[](#use-the-logger-channel)

You have two options: log only to discord or add the channel to the stack

#### Log only to the discord channel

[](#log-only-to-the-discord-channel)

Simply change the `.env` variable to use the discord channel

```
LOG_CHANNEL=discord

```

#### Add the channel on top of other channels

[](#add-the-channel-on-top-of-other-channels)

Add the channel to the stack in the `config/logging.php` configuration:

```
// config/logging.php
'channels' => [
    //...
    'stack' => [
        'driver'   => 'stack',
        'channels' => ['single', 'discord'],
    ],
];
```

Then make sure the logging channel is set to stack in your `.env` file:

```
LOG_CHANNEL=stack

```

#### Logging to multiple Discord channels

[](#logging-to-multiple-discord-channels)

Of course, you can send your log messages to multiple Discord channels. Just create as many channels as desired in `config/logging.php` and put them in the stack. Each channel should be named differently and should point to a different web hook URL.

What does it look like?
-----------------------

[](#what-does-it-look-like)

You can get a preview of what it looks like using each of the provided converters.

[![Screenshot](/assets/screenshot.png)](/assets/screenshot.png)

Version history
---------------

[](#version-history)

See the [dedicated change log](CHANGELOG.md)

Credits
-------

[](#credits)

- Got some ideas from [GrKamil/laravel-telegram-logging](https://github.com/GrKamil/laravel-telegram-logging)
- Got some ideas from [lefuturiste/monolog-discord-handler](https://github.com/lefuturiste/monolog-discord-handler)

License
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 75.6% 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 ~105 days

Recently: every ~170 days

Total

12

Last Release

1385d ago

PHP version history (3 changes)v1.0.0PHP &gt;=7.1

v1.1.6PHP &gt;=7.3

v1.1.7PHP &gt;=7.3 | ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/24268764fc213f77043974bb31ec082b3a8f852ec69732a3839e8078d160286d?d=identicon)[emanueltotem](/maintainers/emanueltotem)

---

Top Contributors

[![vpratfr](https://avatars.githubusercontent.com/u/2526465?v=4)](https://github.com/vpratfr "vpratfr (31 commits)")[![BrandonDR](https://avatars.githubusercontent.com/u/30581808?v=4)](https://github.com/BrandonDR "BrandonDR (1 commits)")[![filliph](https://avatars.githubusercontent.com/u/9424286?v=4)](https://github.com/filliph "filliph (1 commits)")[![Jespertastesen](https://avatars.githubusercontent.com/u/7554271?v=4)](https://github.com/Jespertastesen "Jespertastesen (1 commits)")[![Linc70J](https://avatars.githubusercontent.com/u/31087557?v=4)](https://github.com/Linc70J "Linc70J (1 commits)")[![andjsch](https://avatars.githubusercontent.com/u/9936988?v=4)](https://github.com/andjsch "andjsch (1 commits)")[![miraries](https://avatars.githubusercontent.com/u/4648498?v=4)](https://github.com/miraries "miraries (1 commits)")[![pablorsk](https://avatars.githubusercontent.com/u/938894?v=4)](https://github.com/pablorsk "pablorsk (1 commits)")[![ThomasBS](https://avatars.githubusercontent.com/u/5128963?v=4)](https://github.com/ThomasBS "ThomasBS (1 commits)")[![viorelmd](https://avatars.githubusercontent.com/u/8680980?v=4)](https://github.com/viorelmd "viorelmd (1 commits)")[![macerd](https://avatars.githubusercontent.com/u/16547271?v=4)](https://github.com/macerd "macerd (1 commits)")

---

Tags

laravelloggingloggerdiscord

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/macerd-laravel-discord-logger/health.svg)

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

###  Alternatives

[marvinlabs/laravel-discord-logger

Logging to a discord channel in Laravel

2081.1M2](/packages/marvinlabs-laravel-discord-logger)[kabbouchi/laravel-logger-discord-channel

A Discord based Monolog driver for Laravel

149.5k](/packages/kabbouchi-laravel-logger-discord-channel)

PHPackages © 2026

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