Skip to content

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

Notifications You must be signed in to change notification settings

SSvishnevsky/yii2-telegram-log

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii 2.0 Telegram Log Target

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

php composer.phar require -vv --prefer-dist SSvishnevsky/yii2-telegram-log

or add below line to the require section of composer.json file and then run php composer.phar update -vv --prefer-dist --profile

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

How To Use

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

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

Changelog

1.0

  • First version

1.1

  • Add configurable baseUrl

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%