PHP code example of bvcmxy / error-log

1. Go to this page and download the library: Download bvcmxy/error-log 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/ */

    

bvcmxy / error-log example snippets

 php artisan vendor:publish --tag=error-log-config

return [
    'api_uri' => env('ERROR_LOG_API_URI'),
    'context' => [
        'application' => env('APP_NAME', 'default_app'),
        'env' => env('APP_ENV', 'production'),
        'type' => env('LOG_TYPE', 'general'),
        'version' => env('APP_VERSION', null),
        'user' => env('LOG_USER', null),
        'device' => env('LOG_DEVICE', null),
        'now' => env('LOG_NOW', \Carbon\Carbon::now()->toDateTimeString()),
    ]
];

LOG_CHANNEL=error-log
...
APP_VERSION=1.0.0
ERROR_LOG_API_URI=https://errorlog.zf-world.com/api/logs