lexor/laravel-logger-discord-channel

基于 Discord 的 Laravel Monolog 驱动器

dev-master 2018-09-16 18:29 UTC

This package is auto-updated.

Last update: 2024-09-17 09:34:26 UTC


README

基于 Discord 的 Laravel Monolog 驱动器

安装

composer require lexor/laravel-logger-discord-channel:dev-master

使用方法

在您的 config/logging.php 配置文件中添加新的驱动类型

'channels' => [
    'discord' => [
        'driver' => 'custom',
        'via' => Lexor\LoggerDiscordChannel\DiscordLogger::class,
        'webhook' => 'https://discordapp.com/api/webhooks/.....',
        'level' => 'DEBUG',
        'role_id' => null, // role to tag in the error
    ],
],