uzhlaravel / telegramlogs
this is about monitoring your logs in telegram
Fund package maintenance!
uzhlaravel
Requires
- php: ^8.2
- illuminate/contracts: ^10.0||^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
README
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.