LaravelPackages.net
Acme Inc.
Toggle sidebar
eslym/laravel-discord-webhook-log

A Discord webhook handler for monolog in laravel

553
0
1.1.0
About eslym/laravel-discord-webhook-log

eslym/laravel-discord-webhook-log is a Laravel package for a discord webhook handler for monolog in laravel. It currently has 0 GitHub stars and 553 downloads on Packagist (latest version 1.1.0). Install it with composer require eslym/laravel-discord-webhook-log. Discover more Laravel packages by eslym or browse all Laravel packages to compare alternatives.

Last updated

A Discord webhook handler for monolog in laravel

<?php
# config/logging.php

return [
// ...

    'channels' => [

// ...

        'discord' => [
            'driver' => 'monolog',
            'handler' => \Eslym\Laravel\Log\DiscordWebhook\DiscordWebhookHandler::class,
            'with' => [
                'webhook' => env('DISCORD_LOG_WEBHOOK'),
                'message' => env('DISCORD_LOG_MESSAGE'),
            ],
            'formatter' => \Monolog\Formatter\LineFormatter::class,
            'formatter_with' => [
                'format' => '%message% %context% %extra%',
                'allowInlineLineBreaks' => true,
                'ignoreEmptyContextAndExtra' => true,
            ],
        ],

// ...

    ],

// ...
]
# .env
DISCORD_LOG_WEBHOOK="webhook url"
DISCORD_LOG_MESSAGE="Hey <@ (discord user id here) >! here is your log."
Comments