PHPackages                             valgorithms/discord-php-eventlogger - 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. valgorithms/discord-php-eventlogger

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

valgorithms/discord-php-eventlogger
===================================

DiscordPHP EventLogger is a tool designed to generate guild specific logs for the DiscordPHP API Library.

039PHP

Since Jan 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Valgorithms/DiscordPHP-EventLogger)[ Packagist](https://packagist.org/packages/valgorithms/discord-php-eventlogger)[ RSS](/packages/valgorithms-discord-php-eventlogger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

DiscordPHP EventLogger
======================

[](#discordphp-eventlogger)

DiscordPHP EventLogger is a tool designed to generate user logs for the DiscordPHP API Library. It logs various events such as member joins/leaves, message deletions, role updates, and more.

Features
--------

[](#features)

- Logs member joins and leaves
- Logs message deletions and updates
- Logs role creations, deletions, and updates
- Logs channel creations, deletions, and updates
- Logs bans and unbans

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

[](#installation)

To install the DiscordPHP EventLogger, you need to have Composer installed. Run the following command:

```
composer require valgorithms/discord-php-eventlogger
```

Usage
-----

[](#usage)

### Configuration

[](#configuration)

Set the `DISCORDPHP_EVENTLOGGER_GUILD_CHANNELS` environment variable to specify the guilds and their respective log channels. The value should be a comma-separated string where each entry is a guild-channel pair separated by a hyphen.

Example:

```
DISCORDPHP_EVENTLOGGER_GUILD_CHANNELS=1077144430588469349-1077144432463314998,1253459964849164328-1253480680583860367

```

### Example

[](#example)

Here is an example of how to use the EventLogger in your project:

```
require 'vendor/autoload.php';

use Discord\Discord;
use EventLogger\EventLogger;

$discord = new Discord([
    'token' => 'YOUR_DISCORD_BOT_TOKEN',
]);

$events = [
    'CHANNEL_CREATE',
    'CHANNEL_DELETE',
    'CHANNEL_UPDATE',
    'GUILD_BAN_ADD',
    'GUILD_BAN_REMOVE',
    'GUILD_MEMBER_ADD',
    'GUILD_MEMBER_REMOVE',
    'GUILD_MEMBER_UPDATE',
    'MESSAGE_DELETE',
    'GUILD_ROLE_CREATE',
    'GUILD_ROLE_DELETE',
    'GUILD_ROLE_UPDATE',
];

$eventLogger = new EventLogger($discord, $events);

$discord->run();
```

### Custom Events

[](#custom-events)

You can add custom events by modifying the `createDefaultEventListeners` method in the `EventLoggerTrait` trait.

```
private function createDefaultEventListeners(array $events = []): void
{
    // Add your custom event listeners here
}
```

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.

Credits
-------

[](#credits)

DiscordPHP EventLogger by Valithor Obsidion

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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/6f85d19ae7440b91717206e5e67342bae2dcc1c8de0a6f4333bbb75b18212d0f?d=identicon)[valzargaming](/maintainers/valzargaming)

---

Top Contributors

[![valzargaming](https://avatars.githubusercontent.com/u/7202504?v=4)](https://github.com/valzargaming "valzargaming (8 commits)")

### Embed Badge

![Health badge](/badges/valgorithms-discord-php-eventlogger/health.svg)

```
[![Health](https://phpackages.com/badges/valgorithms-discord-php-eventlogger/health.svg)](https://phpackages.com/packages/valgorithms-discord-php-eventlogger)
```

###  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)[ekino/newrelic-bundle

Integrate New Relic into Symfony2

28111.2M8](/packages/ekino-newrelic-bundle)

PHPackages © 2026

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