PHP code example of inktrapdesign / model-logger

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

    

inktrapdesign / model-logger example snippets


use InktrapDesign\ModelLogger\ModelLogger;

class User extends Model
{
    use ModelLogger;
}

'betterstack' => 
  [
    'driver' => 'monolog',
    'level' => env('LOG_LEVEL', 'debug'),
    'handler' => \Logtail\Monolog\LogtailHandler::class,
    'with' => [
        'sourceToken' => env('LOGGER_SOURCE')
    ],
    'processors' => [PsrLogMessageProcessor::class],
  ],

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