PHP code example of robuust / craft-sentry-log-target

1. Go to this page and download the library: Download robuust/craft-sentry-log-target 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/ */

    

robuust / craft-sentry-log-target example snippets




return [
    '*' => [
        'dsn'            => '$SENTRY_DSN' ?: 'https://[email protected]/123456789', // Set as string or use environment variable.
        'sentrySettings' => [], // Use options from Sentry PHP SDK as-is.
        'levels'         => ['error', 'warning'],
        'except'         => ['yii\web\HttpException:40*'],
    ],
];