Send laravel logs into Telegram Chat via bot
kiriminaja/laravel-telegram-log is a Laravel package for send laravel logs into telegram chat via bot.
It currently has 2 GitHub stars and 4.963 downloads on Packagist (latest version 1.0.4.2).
Install it with composer require kiriminaja/laravel-telegram-log.
Discover more Laravel packages by kiriminaja
or browse all Laravel packages to compare alternatives.
Last updated
Send logs to Telegram chat via Telegram bot. Inspired by https://github.com/grkamil/laravel-telegram-logging
composer require kiriminaja/laravel-telegram-log
Please define Telegram Bot Credentials and chat id as environment parameters by modifying .env on your project path
TELEGRAM_BOT_TOKEN=null
TELEGRAM_CHAT_ID=null
TELEGRAM_LOGGER_TEMPLATE=null
TELEGRAM_OPTIONS=[]
Create new logging channel by modifying config/logging.php file
'telegram' => [
'driver' => 'custom',
'via' => TelegramLog\TelegramLogger::class,
'level' => 'debug',
]
Or if your default log channel is a stack, you can add it to the stack channel like this
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'telegram'],
]
By default LOG_CHANNEL will be set into stack so you need to set default logger on env after setting up configurations above
LOG_CHANNEL=telegram
Publish config file and views to override
php artisan vendor:publish --provider "TelegramLog\TelegramServiceProvider"
For using this plugin, you need to create telegram bot
/newbot/start messageconfig(['telegram-logger.template'=>'laravel-telegram-logging::custom'])
Log as usual