PHPackages                             arus/monolog-telegram-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. arus/monolog-telegram-handler

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

arus/monolog-telegram-handler
=============================

Arus // Monolog Telegram Handler for PHP 7.2+ (incl. PHP 8)

v2.1.0(5y ago)63.0k1MITPHPPHP ^7.2|^8.0

Since Jun 24Pushed 5y ago2 watchersCompare

[ Source](https://github.com/autorusltd/monolog-telegram-handler)[ Packagist](https://packagist.org/packages/arus/monolog-telegram-handler)[ Docs](https://github.com/autorusltd/monolog-telegram-handler)[ RSS](/packages/arus-monolog-telegram-handler/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (8)Dependencies (3)Versions (13)Used By (0)

Monolog Telegram Handler for PHP 7.2+ (incl. PHP 8)
---------------------------------------------------

[](#monolog-telegram-handler-for-php-72-incl-php-8)

[![Build Status](https://camo.githubusercontent.com/6ecaeda52bf9e1ae69b8d07fa553be150078878fa02b90f9ecbe142bae25c358/68747470733a2f2f636972636c6563692e636f6d2f67682f6175746f7275736c74642f6d6f6e6f6c6f672d74656c656772616d2d68616e646c65722e7376673f7374796c653d736869656c64)](https://circleci.com/gh/autorusltd/monolog-telegram-handler)[![Code Coverage](https://camo.githubusercontent.com/6d397e963cd15a0116b3085e93517c430aa99012af9fa47a00c0cb7b1676d5fa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6175746f7275736c74642f6d6f6e6f6c6f672d74656c656772616d2d68616e646c65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/autorusltd/monolog-telegram-handler/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/aa848bc335b1edd6e331a23e6a6bfe29325af80f379ebffa490639c293658af4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6175746f7275736c74642f6d6f6e6f6c6f672d74656c656772616d2d68616e646c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/autorusltd/monolog-telegram-handler/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/1b0b0860b63d64c2d80f84633afdfd6e1262c36e55a78aa3aa1ae49bd4795f00/68747470733a2f2f706f7365722e707567782e6f72672f617275732f6d6f6e6f6c6f672d74656c656772616d2d68616e646c65722f646f776e6c6f616473)](https://packagist.org/packages/arus/monolog-telegram-handler)[![Latest Stable Version](https://camo.githubusercontent.com/fa39e500b1561ad0654815610a90439d9e7313afee7182259d99b02bec66114f/68747470733a2f2f706f7365722e707567782e6f72672f617275732f6d6f6e6f6c6f672d74656c656772616d2d68616e646c65722f762f737461626c65)](https://packagist.org/packages/arus/monolog-telegram-handler)[![License](https://camo.githubusercontent.com/e38741290753c3102c9c9f6eb9a74694f98dc7a0d1cf273be17893dc62161e72/68747470733a2f2f706f7365722e707567782e6f72672f617275732f6d6f6e6f6c6f672d74656c656772616d2d68616e646c65722f6c6963656e7365)](https://packagist.org/packages/arus/monolog-telegram-handler)

---

Installation (via composer)
---------------------------

[](#installation-via-composer)

```
composer require 'arus/monolog-telegram-handler:^2.1'
```

How to use?
-----------

[](#how-to-use)

```
use Arus\Monolog\Handler\TelegramHandler;
use Monolog\Logger;

$token = '000000000:000000000ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$recipient = '000000000';

$sender = new TelegramHandler($token, $recipient);

$logger = new Logger('app');
$logger->pushHandler($sender);

$logger->debug('Hello, world!');
```

#### Send a photo

[](#send-a-photo)

```
$logger->debug('Hello, world!', [
    'photo' => 'https://example.com/photo.jpeg',
]);
```

#### Send an animation

[](#send-an-animation)

```
$logger->debug('Hello, world!', [
    'animation' => 'https://example.com/animation.gif',
]);
```

#### Send a video

[](#send-a-video)

```
$logger->debug('Hello, world!', [
    'video' => 'https://example.com/video.mp4',
]);
```

### Set custom API URL (relevant for Russia)

[](#set-custom-api-url-relevant-for-russia)

#### Via API

[](#via-api)

```
$sender->setUrl('https://proxy.api.telegram.example.com');
```

#### Via environment

[](#via-environment)

```
putenv('TELEGRAM_URL=https://proxy.api.telegram.example.com');
```

Test run
--------

[](#test-run)

Create your `phpunit.xml` file:

```
cp phpunit.xml.dist phpunit.xml
```

Open your `phpunit.xml` file and set the following environment variables: `TELEGRAM_TOKEN` and `TELEGRAM_RECIPIENT`, then:

```
php vendor/bin/phpunit --colors=always --coverage-text
```

Useful links
------------

[](#useful-links)

-

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~84 days

Recently: every ~146 days

Total

8

Last Release

1922d ago

Major Versions

v1.1.0 → v2.0.02020-01-24

PHP version history (3 changes)v1.0.0PHP ^7.1

v2.0.0PHP ^7.2

v2.1.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2872934?v=4)[Anatolii Nekhai](/maintainers/fenric)[@fenric](https://github.com/fenric)

---

Top Contributors

[![fenric](https://avatars.githubusercontent.com/u/2872934?v=4)](https://github.com/fenric "fenric (34 commits)")[![itrukhin](https://avatars.githubusercontent.com/u/5526173?v=4)](https://github.com/itrukhin "itrukhin (2 commits)")

---

Tags

monologmonolog-telegram-handlerphp7php8telegramtelegrammonologPHP7php8fenricarus

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arus-monolog-telegram-handler/health.svg)

```
[![Health](https://phpackages.com/badges/arus-monolog-telegram-handler/health.svg)](https://phpackages.com/packages/arus-monolog-telegram-handler)
```

###  Alternatives

[rahimi/monolog-telegram

A handler for Monolog that sends messages to Telegram Channels

6980.2k](/packages/rahimi-monolog-telegram)[mero/telegram-handler

Monolog handler to send log by Telegram

36113.3k](/packages/mero-telegram-handler)[jacklul/monolog-telegram

Monolog handler that sends logs through Telegram bot to any chat in HTML format

2364.7k1](/packages/jacklul-monolog-telegram)[thecoder/laravel-monolog-telegram

Telegram Handler for Monolog

2939.5k](/packages/thecoder-laravel-monolog-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
