nechaienko / laravel-telegram-logging
There is no license information available for the latest version (1.0.11) of this package.
Logging to Telegram using Laravel logging
1.0.11
2019-05-30 08:08 UTC
Requires
- php: >=7.1
- illuminate/support: ~5.6
README
This package gives opportunity logging to telegram with custom Laravel logging
Installation
composer require nechaienko/laravel-telegram-logging
Configuration
Add configurations to file ..\your_project\config\logging.php
'telegram' => [
'driver' => 'custom',
'via' => \Nechaienko\TelegramLogging\LogToTelegram::class,
'level' => 'info'
],
Add Telegram Bot Token to file ..\your_project\.env
TELEGRAM_BOT_TOKEN=****
Create file telegram.php in config folder
..\your_project\config\telegram.php'
<?php
return [
'telegram_admin_ids' => [
'*********', //developer 1
'*********', //developer 2
]
];
Usage
use Illuminate\Support\Facades\Log;
...
Log::channel('telegram')->info('message');