Skip to content

FoxxMD/laravel-loggly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Loggly

Loggly logging and error integration for Laravel 5. Based on laravel-rollbar by jenssegers.

This package is still IN DEVELOPMENT.

Installation

Install using composer:

composer require FoxxMD/loggly

Add the service provider to the 'providers' array in config/app.php:

'FoxxMD\Loggly\LogglyServiceProvider',

Configuration

This package supports configuration through the services configuration file located in app/config/services.php. All configuration variables will be directly passed to Rollbar:

'loggly' => [
    'key' => 'your-loggly-token',
    'level' => 'debug',
    'tags' => ['your-tokens]
],

The level variable defines the minimum log level at which log messages are sent to Loggly.

Usage

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

public function report(Exception $e)
{
    \Log::error($e);

    return parent::report($e);
}

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

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

Your other log messages will also be sent to Loggly:

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

About

A service provider for logging with Loggly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages