predanie/bitrix24-monolog-bundle
Composer 安装命令:
composer require predanie/bitrix24-monolog-bundle
包简介
Allows you send errors to a bitrix24 chat using a webhook integration
关键字:
README 文档
README
Installation
Install using Composer:
./composer require predanie/bitrix24-monolog-bundle
This version was tested with a project based on symfony 3.4.
Add the bundle to your AppKernel.php:
$bundles = array( //... new Predanie\Bitrix24Bundle\PredanieBitrix24MonologBundle(), //... );
Create a monolog.yml file using current path app/config/bitrix24/monolog.yml and include it to the config_prod.yml file:
imports:
- { resource: bitrix24/monolog.yml }
Add bitrix24 handler and configure it:
monolog: handlers: bitrix24: type: service id: predanie.bitrix24_monolog_handler predanie_bitrix24_monolog: chat_id: '%bitrix24_chat_id%' user_id: '%bitrix24_user_id%' webhook: '%bitrix24_webhook%'
Add parameters to your parameters.yml:
bitrix24_chat_id: 1 # your bitrix24 chat for logging bitrix24_user_id: 1 # user id who send messages to bitrix24 chat bitrix24_webhook: xxxxxxxxxxxxxx # Weebhook code - need to create in the Bitrix24 admin panel
Enjoy!
P.S.: if you need send some custom exceptions just call the bitrix24 manager.
DefaultController.php example:
$this->get('predanie.bitrix24_manager')->imMessageAdd($e->getMessage());
统计信息
- 总下载量: 2.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-31