PHP code example of smart-contact / sce-smart-log-client

1. Go to this page and download the library: Download smart-contact/sce-smart-log-client 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/ */

    

smart-contact / sce-smart-log-client example snippets



return [
    //...

    'channels' => [
        //...
        'smartlog' => [
            'driver' => 'monolog',
            'handler' => \SmartContact\SmartLogClient\LogHandlers\SmartLogHandler::class,
            'level' => config('logging.level')
        ]
    ]
];

...

'stack' => [
    'driver' => 'stack',
    'channels' => ['single', 'smartlog'],
    'ignore_exceptions' => false,
],

...

// app/Exceptions/Handler.php



namespace App\Exceptions;

use Throwable;
use SmartContact\SmartLogClient\Exceptions\SmartLogClientException;

class Handler extends SmartLogClientException{
    //...
}

 bash
php artisan vendor:publish --tag="smartlog-client-config"