PHPackages                             zamcoder/laravel-discord-log-notification - 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. zamcoder/laravel-discord-log-notification

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

zamcoder/laravel-discord-log-notification
=========================================

Logging to a discord channel in Laravel

18PHP

Since Jun 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/zamcoder/laravel-discord-log-notification)[ Packagist](https://packagist.org/packages/zamcoder/laravel-discord-log-notification)[ RSS](/packages/zamcoder-laravel-discord-log-notification/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#laravel-discord-logger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fd6c2e20aa3acd7c69286344121c98d81b6316256d789e5c295864f2cf5b6bab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a616d636f6465722f6c61726176656c2d646973636f72642d6c6f672d6e6f74696669636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zamcoder/laravel-discord-log-notification)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/ba42b2fd8f92a15b8abd4162f5de28eb5ee31dd44f1103e2f5da8127b54647e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a616d636f6465722f6c61726176656c2d646973636f72642d6c6f672d6e6f74696669636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zamcoder/laravel-discord-log-notification)

`zamcoder/laravel-discord-log-notification` 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 zamcoder/laravel-discord-log-notification
```

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' => [
    ...
    ZamCoder\DiscordLogger\ServiceProvider::class
];
```

You can then publish the configuration file:

```
php artisan vendor:publish --provider "ZamCoder\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'    => ZamCoder\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

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 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://www.gravatar.com/avatar/f273a0abb26d530c64d2c74d68c916ec1c99ad7f409346673da43932a82f3cb3?d=identicon)[zamcoder](/maintainers/zamcoder)

---

Top Contributors

[![zamcoder](https://avatars.githubusercontent.com/u/76896394?v=4)](https://github.com/zamcoder "zamcoder (3 commits)")

### Embed Badge

![Health badge](/badges/zamcoder-laravel-discord-log-notification/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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