diegocomis/cakephp-slack-log-engine
Composer 安装命令:
composer require diegocomis/cakephp-slack-log-engine
包简介
Slack log engine for CakePHP
README 文档
README
What is this?
This is CakePHP plugin to provide a log engine that post to slack using incoming webhooks.
Please see detail how to configure webhooks on slack.
The engine uses Slack for PHP and is just thin wrapper for the library.
Installation
composer require diegocomis/cakephp-slack-log-engine
Requirementscurl -sS https://getcomposer.org/installer | php
- CakePHP 4.1.7
- PHP 7.2
Usage
Configure log
In your app.php, you can configure like:
'Log' => [
'error' => [
'className' => 'SlackLogEngine\Log\Engine\SlackLogEngine',
// Your slack hook URL here
'hookUrl' => 'https://hooks.slack.com/services/xxxxx/xxxxx/xxxxxxxxxx',
// Send logs of following levels to slack
'levels' => ['error', 'critical', 'alert', 'emergency'],
],
],
Log options
Either client or hookUrl is required.
hookUrl[string] Slack hook url.client[\Maknz\Slack\Client] Slack client instance for custom.clientClass[string(optional)] slack client class. This option is used only withhookUrloption.
Other available settings can be seen at Slack for PHP Official Docs
统计信息
- 总下载量: 750
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-13