PHP code example of jcf / getsentry

1. Go to this page and download the library: Download jcf/getsentry 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/ */

    

jcf / getsentry example snippets


'Jcf\Getsentry\GetsentryServiceProvider',

return array(

    'dsn' => 'https://1f68584cfb824d123432534ab452adb778:[email protected]/26241',

    'environments' => ['stagging', 'production'],

    'environments' => ['error', 'emergency', 'notice', 'info', 'debug'],

    'saveEventId' => true,

	// Debug with User and Extra Data
    \Log::debug('Debugging', [
	'user' => [
		'id' => 99,
		'email' => '[email protected]',
		'data' =>[
			'Member Since' => '2011-09-07'
		]
	]
	, 'extra' => ['Ammount' => '142', 'Membership' => 'Activated']]
    );

    // Debug with User
    \Log::debug('Debug bug!', ['user' => 'jotafurtado']);

    // Info with User
    \Log::info('User has logged in.', ['user' => 'jotafurtado']);

    // Simple Error
    \Log::error('Image not saved.');
sh
php composer.phar update
sh
php artisan config:publish jcf/getsentry

 \Session::get('sentryEventId');