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

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

flashteamdev/laravel-telegram-logging
=====================================

Send logs to Telegram chat via Telegram bot

v13.0.0(1mo ago)05.5kMITPHPPHP ^8.2

Since Mar 19Pushed 1mo agoCompare

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

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

Laravel Telegram logger
=======================

[](#laravel-telegram-logger)

Send logs to Telegram chat via Telegram bot

Install
-------

[](#install)

```

composer require flashteamdev/laravel-telegram-logging

```

Define Telegram Bot Token and chat id (users telegram id) and set as environment parameters. Add to **.env**

```
TELEGRAM_LOGGER_BOT_TOKEN="id1:token1,id2:token2"
TELEGRAM_LOGGER_CHAT_ID=chat_id

```

Add to **config/logging.php** file new channel:

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

If your default log channel is a stack, you can add it to the **stack** channel like this

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

Or you can simply change the default log channel in the .env

```
LOG_CHANNEL=telegram

```

Publish config file and views

```
php artisan vendor:publish --provider "Logger\TelegramLoggerServiceProvider"

```

Telegram Logging Formats
------------------------

[](#telegram-logging-formats)

You can choose among two different formats that you can specify in the `.env` file like this :

```
# Use a minimal log template
TELEGRAM_LOGGER_TEMPLATE = laravel-telegram-logging::minimal

# Or use the backward compatible one (default setting used even without inserting this row)
TELEGRAM_LOGGER_TEMPLATE = laravel-telegram-logging::standard

```

It is possible to create other blade templates and reference them in the `TELEGRAM_LOGGER_TEMPLATE` entry

Create bot
----------

[](#create-bot)

For using this package you need to create Telegram bot

1. Go to @BotFather in the Telegram
2. Send `/newbot`
3. Set up name and bot-name for your bot.
4. Get token and add it to your .env file (it is written above)
5. Go to your bot and send `/start` message

Change log template at runtime
------------------------------

[](#change-log-template-at-runtime)

1. Change config for template.

```
config(['telegram-logger.template'=>'laravel-telegram-logging::custom'])
```

2. Use `Log` as usual.

Configuring a different chat id or token per channel
----------------------------------------------------

[](#configuring-a-different-chat-id-or-token-per-channel)

1. Add `chat_id` or `token` to channels in `config/logging.php`. Overrides `config('telegram.chat_id')`.

```
[
    'channels' => [
        [
            'company' => [
                'driver' => 'custom',
                'via' => TelegramLogger::class,
                'chat_id' => env('TELEGRAM_COMPANY_CHAT_ID'),
                'token' => env('TELEGRAM_COMPANY_BOT_TOKEN'),
                'level' => 'debug'
            ],

            'operations' => [
                'driver' => 'custom',
                'via' => TelegramLogger::class,
                'chat_id' => env('TELEGRAM_OPERATIONS_CHAT_ID'),
                'token' => env('TELEGRAM_OPERATIONS_BOT_TOKEN'),
                'level' => 'debug'
            ]
        ]
    ]
]
```

2. Use `Log` as usual.

Proxy support
-------------

[](#proxy-support)

To use a proxy server, set the variable in the .env

```
TELEGRAM_LOGGER_PROXY=proxy_server.com:port

```

Exclude logs
------------

[](#exclude-logs)

To ignore logs containing specific text, add the following to your `.env` file:

```
TELEGRAM_LOGGER_EXCLUDE_WORDS="word1,word2"

```

Or you can add them to your `config/logging.php` channel:

```
'telegram' => [
    'driver' => 'custom',
    'via'    => Logger\TelegramLogger::class,
    'level'  => 'debug',
    'exclude_words' => ['word1', 'word2'],
]
```

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance88

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.6% 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

59d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d0f3c4c484def533574ea61cb98cac3271481ba99fa394be5b48a2195d624d7?d=identicon)[nguyentranchung](/maintainers/nguyentranchung)

---

Top Contributors

[![grkamil](https://avatars.githubusercontent.com/u/10536620?v=4)](https://github.com/grkamil "grkamil (45 commits)")[![nguyentranchung](https://avatars.githubusercontent.com/u/9611224?v=4)](https://github.com/nguyentranchung "nguyentranchung (20 commits)")[![arnidan](https://avatars.githubusercontent.com/u/5755685?v=4)](https://github.com/arnidan "arnidan (2 commits)")[![constantable](https://avatars.githubusercontent.com/u/11844178?v=4)](https://github.com/constantable "constantable (2 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![sam130117](https://avatars.githubusercontent.com/u/21005324?v=4)](https://github.com/sam130117 "sam130117 (2 commits)")[![sauravkumal](https://avatars.githubusercontent.com/u/46340985?v=4)](https://github.com/sauravkumal "sauravkumal (2 commits)")[![cwilby](https://avatars.githubusercontent.com/u/13686317?v=4)](https://github.com/cwilby "cwilby (1 commits)")[![Pashkinz92](https://avatars.githubusercontent.com/u/4114995?v=4)](https://github.com/Pashkinz92 "Pashkinz92 (1 commits)")[![srustamov](https://avatars.githubusercontent.com/u/22997563?v=4)](https://github.com/srustamov "srustamov (1 commits)")[![i3bepb](https://avatars.githubusercontent.com/u/1553797?v=4)](https://github.com/i3bepb "i3bepb (1 commits)")[![isudakoff](https://avatars.githubusercontent.com/u/2142861?v=4)](https://github.com/isudakoff "isudakoff (1 commits)")[![stucchi](https://avatars.githubusercontent.com/u/3639626?v=4)](https://github.com/stucchi "stucchi (1 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/flashteamdev-laravel-telegram-logging/health.svg)](https://phpackages.com/packages/flashteamdev-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)
