uzhlaravel/telegramlogs

this is about monitoring your logs in telegram

v0.1.4 2025-06-24 14:52 UTC

This package is auto-updated.

Last update: 2025-06-24 14:54:50 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Get real-time Laravel application logs directly in your Telegram channel. This package provides instant monitoring of your application's critical events through Telegram messages, with support for threaded discussions and Markdown formatting.

Features

  • ๐Ÿ“จ Instant delivery of logs to Telegram
  • ๐Ÿ”” Configurable log levels (emergency to debug)
  • ๐Ÿงต Support for Telegram topic threads
  • โœ๏ธ MarkdownV2 formatted messages
  • ๐Ÿ“ฆ Automatic splitting of long messages
  • โฑ Configurable timeout for API calls
  • ๐Ÿ›  Test command to verify your setup

Installation

You can install the package via composer:

composer require uzhlaravel/telegramlogs

You can publish the config file with:

php artisan vendor:publish --tag="telegramlogs-config"

This is the contents of the published config file:

return [
    'bot_token' => env('TELEGRAM_BOT_TOKEN'),
    'chat_id' => env('TELEGRAM_CHAT_ID'),
    'topic_id' => env('TELEGRAM_TOPIC_ID'),
];

This is the contents in .env:

TELEGRAM_LOGS_BOT_TOKEN=your_bot_token_here
TELEGRAM_LOGS_CHAT_ID=your_chat_id_here
# Optional:
TELEGRAM_LOGS_TOPIC_ID=your_thread_id_here
TELEGRAM_LOGS_LEVEL=error

Usage

$telegramlogs = new Uzhlaravel\Telegramlogs();
echo $telegramlogs->echoPhrase('Hello, Uzhlaravel!');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.