Download the PHP package emotality/laravel-telegram-logger without Composer
On this page you can find all versions of the php package emotality/laravel-telegram-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download emotality/laravel-telegram-logger
More information about emotality/laravel-telegram-logger
Files in emotality/laravel-telegram-logger
Package laravel-telegram-logger
Short Description Laravel package to report exceptions to a Telegram chat, group or channel.
License MIT
Homepage https://github.com/emotality/laravel-telegram-logger
Informations about the package laravel-telegram-logger
Telegram Logger for Laravel
Laravel package to report exceptions to a Telegram chat, group or channel.
Requirements
- PHP 8.1+
- Laravel 10
Installation
composer require emotality/laravel-telegram-logger
php artisan vendor:publish --provider="Emotality\Telegram\TelegramLoggerServiceProvider"
-
Add the following lines to your
.env
: - Add the
telegram
block to thechannels
array, inside yourconfig/logging.php
file:
_Note: Read more about the cache_ttl
key below._
- Update your log stack and add
telegram
to thechannels
array inconfig/logging.php
:
or change your LOG_CHANNEL
in your .env
:
Caching TTL explained:
A MD5 checksum is being created for every exception, then that checksum is being cached for the cache_ttl
seconds you provide. If checksum exists in the cache, the log will not be sent.
In other words, when the exact same exception reoccurs, only the first exception will be logged, if after 300 seconds it still occurs, it will be logged again.
Only the first occurrence of the same exception will be logged every 300 seconds to avoid flooding the Telegram API and your chat.
The cache_ttl
key accepts false
to disable caching, meaning, each and every exception will be logged to Telegram, even if it's 1000 of the same exception.
License
laravel-telegram-logger is released under the MIT license. See LICENSE for details.
All versions of laravel-telegram-logger with dependencies
ext-json Version *
illuminate/support Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
monolog/monolog Version ^3.0