PHPackages                             sergeymakinen/yii2-telegram-log - 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. sergeymakinen/yii2-telegram-log

AbandonedArchivedYii2-extension[Logging &amp; Monitoring](/categories/logging)

sergeymakinen/yii2-telegram-log
===============================

Telegram log target for Yii 2

v2.0.0(9y ago)2578.4k—3.3%14[1 issues](https://github.com/sergeymakinen/yii2-telegram-log/issues)[1 PRs](https://github.com/sergeymakinen/yii2-telegram-log/pulls)MITPHP

Since Jan 5Pushed 5y ago7 watchersCompare

[ Source](https://github.com/sergeymakinen/yii2-telegram-log)[ Packagist](https://packagist.org/packages/sergeymakinen/yii2-telegram-log)[ Docs](https://github.com/sergeymakinen/yii2-telegram-log)[ RSS](/packages/sergeymakinen-yii2-telegram-log/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Telegram log target for Yii 2
=============================

[](#telegram-log-target-for-yii-2)

[Telegram](https://telegram.org) log target for Yii 2.

[![Screenshot](docs/README.png)](docs/README.png)

[![Code Quality](https://camo.githubusercontent.com/3f787c587b90bf34e908c5c473f43f15808c932c1a9a7146fd19fe3ca316fbc4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7365726765796d616b696e656e2f796969322d74656c656772616d2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/sergeymakinen/yii2-telegram-log) [![Build Status](https://camo.githubusercontent.com/f9b21e47c8b69da4b39b4f5307f6af0f13ad478632900c68acbddac288f8c39c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7365726765796d616b696e656e2f796969322d74656c656772616d2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/sergeymakinen/yii2-telegram-log) [![Code Coverage](https://camo.githubusercontent.com/09569995387f7b2b8b6138f2f8e5c53227e5ae0044a0cd3222ff4edd5b39812f/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7365726765796d616b696e656e2f796969322d74656c656772616d2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/sergeymakinen/yii2-telegram-log) [![SensioLabsInsight](https://camo.githubusercontent.com/7235f633d49ed95201a4d017cdd58482df6cbc3996a39d9c77fad78ff1ef348f/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f38623466333233362d376337382d343264312d383335352d3534363035353938643934312e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/8b4f3236-7c78-42d1-8355-54605598d941)

[![Packagist Version](https://camo.githubusercontent.com/3658e74d318f8db0d88a657ab98f3af1d11ead95f3f4975a07ed4f8a174b23e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365726765796d616b696e656e2f796969322d74656c656772616d2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sergeymakinen/yii2-telegram-log) [![Total Downloads](https://camo.githubusercontent.com/5b5566e9d8b80748d71c15821f8f0f5836bd3a1ea5df04df84f45a50cdb7e7c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7365726765796d616b696e656e2f796969322d74656c656772616d2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sergeymakinen/yii2-telegram-log) [![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Either run

```
composer require "sergeymakinen/yii2-telegram-log:^2.0"
```

or add

```
"sergeymakinen/yii2-telegram-log": "^2.0"
```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

First [create a new bot](https://core.telegram.org/bots#6-botfather) and obtain its token. It should look like `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11`.

You will also need a [chat ID](https://stackoverflow.com/questions/31078710/how-to-obtain-telegram-chat-id-for-a-specific-user) to send logs to. You can use the [`@get_id_bot`](https://telegram.me/get_id_bot) bot to obtain it. It should look like `123456789`.

Then set the following Yii 2 configuration parameters:

```
'components' => [
    'log' => [
        'targets' => [
            [
                'class' => 'sergeymakinen\yii\telegramlog\Target',
                'token' => '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11',
                'chatId' => 123456789,
            ],
        ],
    ],
],
```

Configuration
-------------

[](#configuration)

By default `yii\log\Logger` error levels are mapped to emojis (you can tweak them in the `levelEmojis` property):

Error levelEmoji`Logger::LEVEL_ERROR`☠️`Logger::LEVEL_WARNING`⚠️`Logger::LEVEL_INFO`ℹ️`Logger::LEVEL_TRACE`📝It's also possible to disable notifications - entirely or per logger level (look at the `enableNotification` property), for example:

```
public $enableNotification = [
    Logger::LEVEL_ERROR => true,
    Logger::LEVEL_WARNING => false,
    Logger::LEVEL_INFO => false,
];
```

This will disable notifications for warning and info level messages and enable them for other levels (honestly, you can omit the `LEVEL_ERROR` definition here as it's `true` by default).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~21 days

Total

2

Last Release

3398d ago

Major Versions

v1.0.0 → v2.0.02017-01-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/362b43cdb5f7eb9e46a3e650b533e83cf2e6492ff705693f60b646b66c0cf8a7?d=identicon)[sergeymakinen](/maintainers/sergeymakinen)

---

Top Contributors

[![sergeymakinen](https://avatars.githubusercontent.com/u/983964?v=4)](https://github.com/sergeymakinen "sergeymakinen (11 commits)")

---

Tags

loglogginglogging-librarynotificationnotificationsphpphp-librarytelegramyii2yii2-extensionlogloggingyii2yiitelegramyii2-telegram-log

### Embed Badge

![Health badge](/badges/sergeymakinen-yii2-telegram-log/health.svg)

```
[![Health](https://phpackages.com/badges/sergeymakinen-yii2-telegram-log/health.svg)](https://phpackages.com/packages/sergeymakinen-yii2-telegram-log)
```

###  Alternatives

[mero/yii2-monolog

The Monolog integration for the Yii framework.

42186.1k](/packages/mero-yii2-monolog)[baibaratsky/yii2-rollbar

Rollbar for Yii2

35130.5k](/packages/baibaratsky-yii2-rollbar)[airani/yii2-telegram-log

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

1655.9k](/packages/airani-yii2-telegram-log)[mero/telegram-handler

Monolog handler to send log by Telegram

36113.3k](/packages/mero-telegram-handler)

PHPackages © 2026

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