vladimir-yuldashev/monolog-telegram

This package is abandoned and no longer maintained. No replacement package was suggested.

Telegram handler for Monolog

v1.0.9 2018-03-06 21:19 UTC

This package is auto-updated.

Last update: 2020-02-05 08:45:39 UTC


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');