PHP code example of jackmartin / telegram-logger-errors

1. Go to this page and download the library: Download jackmartin/telegram-logger-errors library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jackmartin / telegram-logger-errors example snippets


Telegram\Bot\Laravel\TelegramServiceProvider::class,
TLE\TLEServiceProvider::class

'Telegram' => Telegram\Bot\Laravel\Facades\Telegram::class,
'TLE' => TLE\Facades\TLEFacade::class

'bots'  => [
    'common' => [
        'username' => 'Name bot',
        'token'    => 'Token bot',
        'commands' => [],
    ],

],
'default'  => 'common',

'debug' => false

'botname' => ''

'chat_id' => ''

'save_log' => true

'path_save' => 'local'

'disable_exception_telegram' => false

use TLE;

try {

    print_r($a);

} catch (\Exception $e) {

    TLE::exp($e)->send();

}

use TLE;

try {

    print_r($a);

} catch (\Exception $e) {

    TLE::exp($e)->info('Field check')->send();

}

use TLE;

try {

    print_r($a);

} catch (RequestException $e) {

    TLE::guzzle($e)->send();

}

public function report(Exception $exception)
{

    \TLE::exp($exception)->send();

    parent::report($exception);

}
sh
php artisan vendor:publish
sh
php artisan vendor:publish
sh
php artisan vendor:publish --provider="TLE\TLEServiceProvider" --tag="tle-config"