PHPackages                             xuanhieu080/laravel-telegram-logging - 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. xuanhieu080/laravel-telegram-logging

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

xuanhieu080/laravel-telegram-logging
====================================

Send Laravel logs to a Telegram chat via Telegram Bot.

v2.0.2(1y ago)058MITPHPPHP &gt;=7.2 | ^8.2

Since Mar 18Pushed 1y agoCompare

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

READMEChangelog (2)Dependencies (2)Versions (9)Used By (0)

Laravel Telegram Logging
========================

[](#laravel-telegram-logging)

Send Laravel logs to a Telegram chat via Telegram Bot.

[![Total Downloads](https://camo.githubusercontent.com/cd5678e8a42d0438d46d0195d8c7c6c7121fcd62ff47ea80e96f07b94260f756/68747470733a2f2f706f7365722e707567782e6f72672f7875616e686965753038302f6c61726176656c2d74656c656772616d2d6c6f6767696e672f646f776e6c6f616473)](//packagist.org/packages/xuanhieu080/laravel-telegram-logging)[![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LUAC5W7GF2BVW&source=url)[![license](https://camo.githubusercontent.com/797c7ae149b340386c006e066aea0f71f39593c8f520a4a421b88121ccd9ce05/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7875616e686965753038302f6c61726176656c2d74656c656772616d2d6c6f6767696e672e737667)](https://github.com/xuanhieu080/laravel-telegram-logging/blob/master/LICENSE)

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

[](#installation)

To install the package you can use [Composer](https://getcomposer.org/).

```
composer require xuanhieu080/laravel-telegram-logging
```

Publish the package configuration file using the following artisan command:

```
php artisan vendor:publish --provider "XuanHieu\TelegramLogger\TelegramLoggerServiceProvider"
```

To send messages to your Telegram Chat, you first need a Telegram Bot. If you don't have one, see in this [Telegram Instructions](TELEGRAM_BOT_INSTRUCTIONS.md) how to create one.

Set your Bot Token and chat\_id (user, channel or group that will receive log messages) and set as environment variable.

Add in your **.env**, the follows variables:

```
TELEGRAM_BOT_TOKEN=bot_token
TELEGRAM_CHAT_ID=chat_id
```

Usage
-----

[](#usage)

Add the new Log Channel in **config/logging.php**:

```
'telegram' => [
    'driver' => 'custom',
    'via'    => XuanHieu\TelegramLogger\TelegramLogger::class,
    'level'  => 'debug',
]
```

If you use the **stack channel** as default logger, you can just the telegram channel to your stack:

```
'stack' => [
    'driver' => 'stack',
    'channels' => ['single', 'telegram'],
]
```

Or you can simply change the default logging channel in the .env file.

```
LOG_CHANNEL=telegram
```

Great! Your Laravel project can now send logs to your Telegram chat.

You can use **Laravel Log Facade** to send logs to your chat:

```
// Use the Laravel Log Facade
use Illuminate\Support\Facades\Log;
...

// All Laravel log leves are avaiable
Log::channel('telegram')->emergency($message);
Log::channel('telegram')->alert($message);
Log::channel('telegram')->critical($message);
Log::channel('telegram')->error($message);
Log::channel('telegram')->warning($message);
Log::channel('telegram')->notice($message);
Log::channel('telegram')->info($message);
Log::channel('telegram')->debug($message);
```

Telegram Instructions
---------------------

[](#telegram-instructions)

To use this package, you need to create a Telegram bot to send messages to your chat.

If you need help, check out these [Telegram Instructions](TELEGRAM_BOT_INSTRUCTIONS.md) that I created for you.

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Donations are welcome
---------------------

[](#donations-are-welcome)

If this project help you reduce time to develop, you can give me a cup of coffee :)

Donate with Paypal:

[![paypal](https://camo.githubusercontent.com/e1ff554a09e8e92bef25abc553ff05b88f45afd695877cf12f3a46558ef65b2e/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e61746543435f4c472e676966)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LUAC5W7GF2BVW&source=url)

License
-------

[](#license)

[MIT](https://github.com/xuanhieu080/laravel-telegram-logging/blob/master/LICENSE)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.5% 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 ~20 days

Recently: every ~35 days

Total

8

Last Release

644d ago

Major Versions

v1.6 → v2.0.02024-08-06

PHP version history (2 changes)v1.1PHP &gt;=7.2

v2.0.1PHP &gt;=7.2 | ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/788efb1f401946aa7d5d4bf095761ebca348fe1dc66e1fe3bb10825a286c7ae6?d=identicon)[xuanhieu08](/maintainers/xuanhieu08)

---

Top Contributors

[![rafaellaurindo](https://avatars.githubusercontent.com/u/25041169?v=4)](https://github.com/rafaellaurindo "rafaellaurindo (35 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![xuanhieu080](https://avatars.githubusercontent.com/u/141008977?v=4)](https://github.com/xuanhieu080 "xuanhieu080 (3 commits)")[![ProMasoud](https://avatars.githubusercontent.com/u/16334025?v=4)](https://github.com/ProMasoud "ProMasoud (2 commits)")

### Embed Badge

![Health badge](/badges/xuanhieu080-laravel-telegram-logging/health.svg)

```
[![Health](https://phpackages.com/badges/xuanhieu080-laravel-telegram-logging/health.svg)](https://phpackages.com/packages/xuanhieu080-laravel-telegram-logging)
```

###  Alternatives

[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[rafaellaurindo/laravel-telegram-logging

Send Laravel logs to a Telegram chat via Telegram Bot.

3326.8k](/packages/rafaellaurindo-laravel-telegram-logging)

PHPackages © 2026

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