PHP code example of pbmengine / pbm-logger

1. Go to this page and download the library: Download pbmengine/pbm-logger 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/ */

    

pbmengine / pbm-logger example snippets

 php
// config/logging.php
'channels' => [
// ...
    'stack' => [
        'driver' => 'stack',
        'channels' => ['pbm', 'daily'],
        'ignore_exceptions' => false,
    ],

    'pbm' => [
        'driver' => 'custom',
        'via' => Pbmengine\Logger\LogFactory::class,
        'anonymize_ips' => true,
        'api_endpoint' => '<your endpoint>/api/reports',
        'api_key' => env('PBM_LOGGER_KEY'),
        'level' => Monolog\Logger::DEBUG,
    ],
// ...
]