2017 © Pedro Peláez
 

library rollbar

Rollbar error monitoring integration for Laravel projects

image

jenssegers/rollbar

Rollbar error monitoring integration for Laravel projects

  • Thursday, June 22, 2017
  • by jenssegers
  • Repository
  • 12 Watchers
  • 335 Stars
  • 642,231 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 79 Forks
  • 27 Open issues
  • 19 Versions
  • 5 % Grown

The README.md

Laravel Rollbar

Build Status Coverage Status, (*1)

Rollbar error monitoring integration for Laravel projects. This library adds a listener to Laravel's logging component. Laravel's session information will be sent in to Rollbar, as well as some other helpful information such as 'environment', 'server', and 'session'., (*2)

rollbar, (*3)

Installation

Install using composer:, (*4)

composer require jenssegers/rollbar

Add the service provider to the 'providers' array in config/app.php:, (*5)

Jenssegers\Rollbar\RollbarServiceProvider::class,

If you only want to enable Rollbar reporting for certain environments you can conditionally load the service provider in your AppServiceProvider:, (*6)

    public function register()
    {
        if ($this->app->environment('production')) {
            $this->app->register(\Jenssegers\Rollbar\RollbarServiceProvider::class);
        }
    }

Configuration

This package supports configuration through the services configuration file located in config/services.php. All configuration variables will be directly passed to Rollbar:, (*7)

'rollbar' => [
    'access_token' => env('ROLLBAR_TOKEN'),
    'level' => env('ROLLBAR_LEVEL'),
],

The level variable defines the minimum log level at which log messages are sent to Rollbar. For development you could set this either to debug to send all log messages, or to none to sent no messages at all. For production you could set this to error so that all info and debug messages are ignored., (*8)

Usage

To automatically monitor exceptions, simply use the Log facade in your error handler in app/Exceptions/Handler.php:, (*9)

public function report(Exception $exception)
{
    \Log::error($exception); //rollbar
    parent::report($exception);
}

For Laravel 4 installations, this is located in app/start/global.php:, (*10)

App::error(function(Exception $exception, $code)
{
    Log::error($exception);
});

Your other log messages will also be sent to Rollbar:, (*11)

\Log::debug('Here is some debug information');

NOTE: Fatal exceptions will always be sent to Rollbar., (*12)

Context informaton

You can pass user information as context like this:, (*13)

\Log::error('Something went wrong', [
    'person' => ['id' => 123, 'username' => 'John Doe', 'email' => 'john@doe.com']
]);

Or pass some extra information:, (*14)

\Log::warning('Something went wrong', [
    'download_size' => 3432425235
]);

The Versions

22/06 2017

dev-master

9999999-dev https://github.com/jenssegers/laravel-rollbar

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

25/01 2017

v1.5.1

1.5.1.0 https://github.com/jenssegers/laravel-rollbar

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

20/03 2016

v1.5.0

1.5.0.0 https://github.com/jenssegers/laravel-rollbar

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

17/01 2016

v1.4.6

1.4.6.0 https://github.com/jenssegers/laravel-rollbar

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

13/12 2015

v1.4.5

1.4.5.0 https://github.com/jenssegers/laravel-rollbar

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

06/06 2015

v1.4.4

1.4.4.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

24/05 2015

v1.4.3

1.4.3.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

19/04 2015

v1.4.2

1.4.2.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

08/02 2015

v1.4.1

1.4.1.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

08/02 2015

v1.4.0

1.4.0.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

15/06 2014

v1.3.4

1.3.4.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

10/06 2014

v1.3.3

1.3.3.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

28/05 2014

v1.3.2

1.3.2.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

04/05 2014

v1.3.1

1.3.1.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

02/05 2014

v1.3.0

1.3.0.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

02/05 2014

v1.2.0

1.2.0.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

30/04 2014

v1.1.0

1.1.0.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

28/04 2014

v1.0.1

1.0.1.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar

27/04 2014

v1.0.0

1.0.0.0

Rollbar error monitoring integration for Laravel projects

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging error monitoring rollbar