PHP code example of tonijz / raven

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

    

tonijz / raven example snippets


$raven = new \rcrowe\Raven\Client(##DSN##);

$raven->captureMessage('FooBar');

$raven = new \rcrowe\Raven\Client(##DSN##);

$raven->addHandler(
    new \rcrowe\Raven\Handler\Sync
);

$raven = new \rcrowe\Raven\Client(##DSN##);

$raven->addHandler(
    new \rcrowe\Raven\Handler\Laravel(
        null,
        App::make('queue')
    );
);

$raven->addHandler(
    new \rcrowe\Raven\Handler\Sync(
        new \rcrowe\Raven\Transport\Dummy
    )
);

$raven->addHandler(
    new \rcrowe\Raven\Handler\Sync(
        new \rcrowe\Raven\Transport\Guzzle
    )
);

$raven->addHandler(
    new \rcrowe\Raven\Handler\Sync
);

try {
    throw new Exception('This is an example');
} catch (Exception $ex) {
    Log::error($ex);
}