unixoff/monolog-discord
Composer 安装命令:
composer require unixoff/monolog-discord
包简介
This package for sending logs of discord to a webhook channel.
README 文档
README
This package for sending logs of discord to a webhook channel
Installation
composer require dev-null-group/monolog-discord
Usage
<?php require 'vendor/autoload.php'; use DevNullGroup\MonologDiscord\DiscordWebhookHandler; $webhook = 'Your Webhook URL'; $log = new Monolog\Logger('discord'); $log->pushHandler(new DiscordWebhookHandler($webhook)); $log->info('hello world!');
Symfony setting
monolog: handlers: main: ... discord_webhook_handler: type: service id: discord_webhook_handler services: discord_webhook_handler: class: MonologDiscord\DiscordWebhookHandler arguments: $webhookUrl: '%env(string:DISCORD_WEBHOOK)%'
License
See the LICENSE Apache License 2.0.
统计信息
- 总下载量: 549
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-11-26
