PHP code example of pandora-una / expressive-logger
1. Go to this page and download the library: Download pandora-una/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/ */
pandora-una / 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()
);
},