airani/yii2-telegram-log

Yii 2.0 电信日志目标,将日志发送到电信聊天或频道

安装次数: 43,398

依赖关系: 0

建议者: 0

安全性: 0

星级: 15

关注者: 2

分支: 7

开放问题: 0

类型:yii2-extension

1.0 2016-07-14 07:35 UTC

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

  • 第一个版本