Laravel 5.x.x library for integration Monolog Sentry

v1.6 2019-02-11 09:06 UTC

This package is auto-updated.

Last update: 2021-01-11 20:11:49 UTC


Software License

Laravel 5.x library for integration Monolog errors with Sentry sentry-laravel.

This library implies already installed sentry-laravel.


Go to the root of your Laravel project and run the following command:

Laravel 5.4 or earlier:

composer require timetorock/laravel-monolog-sentry 1.3

Laravel 5.5+:

composer require timetorock/laravel-monolog-sentry

Laravel 5.4 or earlier

(Service will be auto-discovered by Laravel 5.5+)

Then in your config/app.php add the MonologSentryServiceProvider to your providers array

'providers' => array(



Your config/sentry.php file must have DSN from your Sentry project.

'dsn'     => 'https://***:***@sentry.yourdomain.com/{project}'

You can configure Raven through the config/sentry.php config file. All the available options are already in there together with their default values.

You can find more details about the available options in Raven using this link:


By default notification would be send for warning level and more.

You can change log level with sentry.level config option, must be a Monolog number.

Monolog\Logger levels:

    DEBUG = 100;
    INFO = 200;
    NOTICE = 250;
    WARNING = 300;
    ERROR = 400;
    CRITICAL = 500;
    ALERT = 550;
    EMERGENCY = 600;


To test if your Sentry application is correctly grabbing your logs, simply launch php artisan tinker and execute a sample log like so:

$ php artisan tinker
>>> Log::error("This is a test error. Sentry should get this.");


If you discover any security related issues, please email alejandronat@gmail.com or use the issue tracker.



The MIT License (MIT). Please see License File for more information.