Looking to hire Laravel developers? Try LaraJobs

laravel-telegram-logging maintained by nechaienko

Description
Logging to Telegram using Laravel logging
Last update
2019/05/30 10:08 (dev-master)
Links
Downloads
214

Comments
comments powered by Disqus

About Laravel-telegram-logging

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');