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

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

agtong/yii2-telegram-log-target
===============================

Telegram log target for Yii 2

v1.0.0(6y ago)036MITPHP

Since Apr 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/agtong/yii2-telegram-log-target)[ Packagist](https://packagist.org/packages/agtong/yii2-telegram-log-target)[ Docs](https://github.com/agtong/yii2-telegram-log-target)[ RSS](/packages/agtong-yii2-telegram-log-target/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Yii2 Telegram Log Target
========================

[](#yii2-telegram-log-target)

Yii2 [Telegram](https://telegram.org) log target that sends selected log messages to the specified telegram chats or channels.

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

[](#installation)

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

Either run

```
composer require agtong/yii2-telegram-log-target

```

or add

```
"agtong/yii2-telegram-log-target": "*"

```

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

Usage
-----

[](#usage)

Add this log target to the `components` section in your configuration.

```
'components' => [
    'log' => [
        'targets' => [
            [
                'class' => 'agtong\yii2\log\TelegramTarget',
                'botToken' => '123456:abcde',
                'chatId' => '123456',
                'levels' => ['error'],
                'logVars' => [],
            ],
        ],
    ],
],

```

You can choose to disable this target by default,

```
'components' => [
    'log' => [
        'targets' => [
            'telegramTarget => [ // Name this target
                'class' => 'agtong\yii2\log\TelegramTarget',
                'botToken' => '123456:abcde',
                'chatId' => '123456',
                'enabled' => false, // Disabled by default
                'levels' => ['error'],
                'logVars' => [],
            ],
        ],
    ],
],

```

and enable it when required.

```
Yii::$app->log->targets['telegramTarget']->enabled = true;
Yii::error('Hello World!');

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2215d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f576fb9182ca79e1768ef5a7c2140579930906540752026acdb3584b4fc06068?d=identicon)[agtong](/maintainers/agtong)

---

Top Contributors

[![agtong](https://avatars.githubusercontent.com/u/9746205?v=4)](https://github.com/agtong "agtong (1 commits)")

---

Tags

loggingtargettelegramyii2logloggingyii2yiitelegramtargetyii2-telegram-log-target

### Embed Badge

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

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

###  Alternatives

[mero/yii2-monolog

The Monolog integration for the Yii framework.

42186.1k](/packages/mero-yii2-monolog)[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)

PHPackages © 2026

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