jafarili/yii2-telegram-log

Yii 2.0 telegram log target, send logs to the telegram chats or channels

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2021-01-25 18:05 UTC

This package is auto-updated.

Last update: 2024-10-26 03:10:20 UTC


README

Yii 2.0 telegram log target, sends selected log messages to the specified telegram chats or channels

Installation

The preferred way to install this extension is through composer.

Either run

composer require jafarili/yii2-telegram-log

or add below line to the require section of composer.json file and then run composer update

"jafarili/yii2-telegram-log": "*"

How To Use

You should set telegram bot token and chatId in your config file like below code:

'log' => [
    'targets' => [
        [
            'class' => 'Jafarili\log\TelegramTarget',
            'levels' => ['error'],
            'botToken' => '123456:abcde', // bot token secret key
            'chatId' => '123456', // chat id or channel username with @ like 12345 or @channel
        ],
    ],
],

Changelog

1.0

  • First version