airani / yii2-telegram-log
Yii 2.0 电信日志目标,将日志发送到电信聊天或频道
1.0
2016-07-14 07:35 UTC
Requires
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-httpclient: ~2.0
This package is auto-updated.
Last update: 2024-09-08 23:27:58 UTC
README
Yii 2.0 电信日志目标,将选定的日志消息发送到指定的电信聊天或频道
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一
php composer.phar require -vv --prefer-dist airani/yii2-telegram-log
或将以下行添加到 composer.json 文件的 require 部分,然后运行 php composer.phar update -vv --prefer-dist --profile
"airani/yii2-telegram-log": "*"
使用方法
您应该在配置文件中设置 电信机器人令牌 和 chatId,如下所示
'log' => [
'targets' => [
[
'class' => 'airani\log\TelegramTarget',
'levels' => ['error'],
'botToken' => '123456:abcde', // bot token secret key
'chatId' => '123456', // chat id or channel username with @ like 12345 or @channel
],
],
],
更新日志
1.0
- 第一个版本