PHP code example of vperyod / errorlog-handler

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

    

vperyod / errorlog-handler example snippets


// Create handler with a Logger instance
$handler = new Vperyod\ErrorlogHandler\ErrorlogHandler($logger);

// Optionally set the level to log (default:alert)
$handler->setLogLevel(LogLevel::ERROR);

// Optionally disable rethrowing if there are no other handlers for errors
$handler->setReThrow(false);

// Add to your middleware stack, radar, relay, etc.
$stack->middleware($handler);