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

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

spayn/yii2-log-telegram
=======================

Telegram log target for Yii 2

v2.1.2(2y ago)034MITPHP

Since Jan 16Pushed 2y agoCompare

[ Source](https://github.com/Spayn112/yii2-log-telegram)[ Packagist](https://packagist.org/packages/spayn/yii2-log-telegram)[ RSS](/packages/spayn-yii2-log-telegram/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

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

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

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

Fork from [sergeymakinen/yii2-telegram-log](https://github.com/sergeymakinen/yii2-telegram-log)

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

[](#installation)

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

Either run

```
composer require "spayn/yii2-log-telegram"
```

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

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.7% 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 ~32 days

Total

3

Last Release

835d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/161518145?v=4)[spayn](/maintainers/spayn)[@spayn](https://github.com/spayn)

---

Top Contributors

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

---

Tags

logloggingyii2yiitelegram

### Embed Badge

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

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

###  Alternatives

[mero/yii2-monolog

The Monolog integration for the Yii framework.

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

Rollbar for Yii2

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

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

1657.2k](/packages/airani-yii2-telegram-log)

PHPackages © 2026

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