PHPackages                             muchrm/laravel-graylog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. muchrm/laravel-graylog

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

muchrm/laravel-graylog
======================

Log your Laravel application errors to Graylog

0.5.2(8y ago)139MITPHPPHP &gt;=5.6.0

Since Mar 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/muchrm/laravel-graylog)[ Packagist](https://packagist.org/packages/muchrm/laravel-graylog)[ RSS](/packages/muchrm-laravel-graylog/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

\##Notic This is forcked version of [swisnl/laravel-graylog2](https://github.com/swisnl/laravel-graylog2)i'm using it on my project Don't use me yet.

Graylog Logging for Laravel 5.x
===============================

[](#graylog-logging-for-laravel-5x)

[![Latest Stable Version](https://camo.githubusercontent.com/f62284883d35808698fe661812fbec690682835750d8963abef2bb9c898216bc/68747470733a2f2f706f7365722e707567782e6f72672f6d756368726d2f6c61726176656c2d677261796c6f672f762f737461626c65)](https://packagist.org/packages/muchrm/laravel-graylog)[![Build Status](https://camo.githubusercontent.com/2bd12616e0c2329844cb59fc1120172c63865793a7fd47237338585c99e574fd/68747470733a2f2f7472617669732d63692e6f72672f6d756368726d2f6c61726176656c2d677261796c6f672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/muchrm/laravel-graylog)

Installation
------------

[](#installation)

1. Run composer require for this package: `composer require muchrm/laravel-graylog`
2. Add the service provider to app.php if you don't like auto discovery: `Muchrm\Graylog\GraylogServiceProvider`
3. Run `php artisan vendor:publish` to publish the config file to ./config/graylog.php.
4. Configure it to your liking
5. Done!

Logging exceptions
------------------

[](#logging-exceptions)

The default settings enable logging of exceptions. It will add the HTTP request to the GELF message, but it will not add POST values. Check the graylog2.log-requests config to enable or disable this behavior.

Message Processors
------------------

[](#message-processors)

Processors add extra functionality to the handler. You can register processors by modifying the AppServiceProvider:

```
public function register()
{
    //...
    Graylog::registerProcessor(new \Muchrm\Graylog\Processor\ExceptionProcessor());
    Graylog::registerProcessor(new \Muchrm\Graylog\Processor\RequestProcessor());
    Graylog::registerProcessor(new MyCustomProcessor());
    //...
}
```

The following processors are available by default:

**ExceptionProcessor**

Adds exception data to the message if there is any.

**RequestProcessor**

Adds the current Laravel Request to the message. It adds the url, method and ip by default.

Custom processors
-----------------

[](#custom-processors)

You can define a custom processor by implementing `Muchrm\Graylog\Processor\ProcessorInterface`. The result should look something like this:

```
