PHP code example of davidburger / expressive-logger
1. Go to this page and download the library: Download davidburger/expressive-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/ */
davidburger / expressive-logger example snippets
'exceptionFormatterCallback' => function($exception, &$context) {
if (true === empty($context)) {
$context = ['exception' => $exception];
}
return sprintf('Exception %s: "%s" at %s line %s',
get_class($exception),
$exception->getMessage(),
$exception->getFile(),
$exception->getLine()
);
},