1. Go to this page and download the library: Download salamek/raven-nette 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/ */
salamek / raven-nette example snippets
// Initiate sentryLogger
new \Salamek\RavenNette\SentryLogger(
'YOUR_SENTRY_DSN', //Sentry DSN
false, //Log in DEBUG mode ? //You dont want that...
null, //Set where do you want to store file log (Tracy\Debugger::$logDirectory | null | string)
null, //Send email as usual logger ? (Tracy\Debugger::$email | null | string | array )
true,
['release' => 'YOUR_RELEASE'] //All options supported by getsentry/sentry-php
);
use Tracy\Debugger;
Debugger::enable(Debugger::PRODUCTION);
new \Salamek\RavenNette\SentryLogger(
'YOUR_SENTRY_DSN', //Sentry DSN
false, //Log in DEBUG mode ? //You dont want that...
null, //Set where do you want to store file log (Tracy\Debugger::$logDirectory | null | string)
null, //Send email as usual logger ? (Tracy\Debugger::$email | null | string | array )
true,
['release' => 'YOUR_RELEASE'] //All options supported by getsentry/sentry-php
);
Debugger::log('My error', 'error');
yaml
sentryLogger:
dsn: 'YOUR_SENTRY_DSN'
# Optional configuration values
inDebug: false # bool: Log in debug mode ? default is false
directory: null # string|null: Where to store log files ? default is Debugger::$logDirectory, null to disable
email: null # string|null :Where to send email notifications ? default is Debugger::$email, null to disable
options: [release: YOUR_RELEASE] # array :All options supported by getsentry/sentry-php
context:
user: true # Send logged in user information
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.