Package Data | |
---|---|
Maintainer Username: | aqhmal |
Maintainer Contact: | me@aqhmal.com (Aqhmal) |
Package Create Date: | 2021-11-29 |
Package Last Update: | 2022-06-23 |
Home Page: | https://packagist.org/packages/aqhmal/laravel-telegram-log |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-22 15:01:32 |
Package Statistics | |
---|---|
Total Downloads: | 2,180 |
Monthly Downloads: | 85 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
A package to send Laravel logs to Telegram via Telegram Bot. This package adds the Lumen support for this Laravel package. Currently tested for support Laravel/Lumen 8 and not tested yet for earlier versions.
composer require aqhmal/laravel-telegram-log
'telegram' => [
'driver' => 'custom',
'via' => Aqhmal\TelegramLog\TelegramLog::class,
'level' => env('LOG_LEVEL', 'debug'),
]
If you use stack as the default log channel, you can append the telegram channel in it.
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'telegram'],
]
TELEGRAM_BOT_TOKEN=bot_token
TELEGRAM_CHAT_ID=chat_id
LOG_CHANNEL
value in your .env to telegram
LOG_CHANNEL=telegram
Register a new Service Provider in bootstrap/app.php.
$app->register(Aqhmal\TelegramLog\TelegramLogServiceProvider::class);
You may write information to the logs using the Log facade. Refer here for more detail.
use Illuminate\Support\Facades\Log;
Log::emergency($message);
Log::alert($message);
Log::critical($message);
Log::error($message);
Log::warning($message);
Log::notice($message);
Log::info($message);
Log::debug($message);
This Telegram log package is licensed under the MIT license.