vladimir-yuldashev / monolog-telegram
Telegram handler for Monolog
Installs: 19 142
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 1
Forks: 3
Open Issues: 3
Requires
- php: ^7.0
- graham-campbell/guzzle-factory: ^3.0
- monolog/monolog: 1.*
Requires (Dev)
- larapack/dd: ^1.1
- phpunit/phpunit: ^7.0
README
Installation
$ composer require vladimir-yuldashev/monolog-telegram
Usage
<?php use Monolog\Logger; use VladimirYuldashev\Monolog\TelegramHandler; $telegramToken = ''; $chatId = 1; $handler = new TelegramHandler( Logger::ERROR, $telegramToken, $chatId ); $log = new Logger('name'); $log->pushHandler($handler); // add records to the log $log->warning('Foo'); $log->error('Bar');