PHP code example of facile-it / sentry-psr-log
1. Go to this page and download the library: Download facile-it/sentry-psr-log 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/ */
facile-it / sentry-psr-log example snippets
$ravenClient = new Raven_Client('dsn', []);
$logger = new Facile\Sentry\Log\Logger($ravenClient);
// Logging message
$logger->error('message', ['foo' => 'bar']);
// Logging exception
$exception = new \RuntimeException('foo');
$logger->error($exception, ['foo' => 'bar']);