ahmyi / cakephp_discord_log
CakePHP 的 Discord 日志插件
v0.0.1
2019-11-06 16:16 UTC
Requires
- cakephp/cakephp: ^3.5
Requires (Dev)
- phpunit/phpunit: ^5.7.14|^6.0
This package is auto-updated.
Last update: 2024-09-07 03:23:48 UTC
README
安装
您可以使用 composer 将此插件安装到您的 CakePHP 应用程序中。
安装 composer 包的推荐方法是
composer require ahmyi/cakephp_discord_log
CakePHP config/app.php
'Log' => [
'debug' => [
'className' => 'Ahmyi\DiscordLog\Log\Engine\DiscordLog',
'path' => LOGS,
'file' => 'debug',
'url' => env('LOG_DEBUG_URL', null),
'scopes' => false,
'webhook' => WEBHOOK_URL
],
'error' => [
'className' => 'Ahmyi\DiscordLog\Log\Engine\DiscordLog',
'path' => LOGS,
'file' => 'error',
'url' => env('LOG_ERROR_URL', null),
'scopes' => false,
'levels' => [ 'error', 'critical', 'alert', 'emergency'],
'webhook' => WEBHOOK_URL
]
],
Discord webhook
您可以在以下链接中了解如何创建 webhook 这里。