PHPackages                             johnturingan/laravel-exception-logger - 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. johnturingan/laravel-exception-logger

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

johnturingan/laravel-exception-logger
=====================================

Unified Exception Logging System across Laravel Applications

1.0.2(7y ago)01.2k1MITPHPPHP &gt;=7.0

Since Jun 19Pushed 7y ago2 watchersCompare

[ Source](https://github.com/johnturingan/laravel-exception-logger)[ Packagist](https://packagist.org/packages/johnturingan/laravel-exception-logger)[ RSS](/packages/johnturingan-laravel-exception-logger/feed)WikiDiscussions master Synced today

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

Laravel Exception Logger
========================

[](#laravel-exception-logger)

Its an Exception Logging Library made for Laravel Application

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

[](#installation)

Run the following command

```
$ composer require johnturingan/laravel-exception-logger

```

or modify your composer.json like below

```
"require": {
	...
	"johnturingan/laravel-exception-logger": "*",
	...
}

```

Then run **$ composer install** or **$ composer update**, whichever you prefer.

> ### Laravel Installation
>
> [](#laravel-installation)

You need to register the package by going to **config/app.php** file then add it to the list of providers.

```
'providers' => [
	...
	Snp\Logger\Providers\LaravelProvider::class
	...
]

```

or in Lumen Application

```
$app->register(Snp\Logger\Providers\LumenProvider::class);

```

Then publish it by using this command

```
$ php artisan vendor:publish --provider="Snp\Logger\Providers\LaravelProvider::class"

```

Keep in mind that config may vary from application to application, it is a must that you check your config file `config/logging.php` and replace the values that is suitable to the application who will use it.

Recommended Usage
-----------------

[](#recommended-usage)

### Exceptions

[](#exceptions)

There are several ways on how to use this package but it is highly recommended that you follow implementations enumerated below:

1. It is highly recommend that you extend your **custom exception** from

> **Snp\\Logger\\Exceptions\\Exception**

```
Then set corresponding values info it like domain, reference_id, etc..

If you extend your exception from **Snp\Logger\Exceptions\Exception** class, it will automatically log it in Graylog or in storage logs if configured in config/logging.php

```

2. Another option is to use it in **App\\Exceptions\\Handler** file. Here's how to do it:
    - Extend the **App\\Exceptions\\Handler** class from **Snp\\Logger\\Exceptions\\Exception**
    - In **report()** method, add "app\_fault" property in Exception $e to determine which application throws an Error.
    - Then create an **Snp\\Logger\\Info** object and assign it to "log\_info" property in Exception $e then pass the Exception to report() method.

        **Below is an example:**

        ```
         public function report(Exception $e)
         {

             $e->{'app_fault'} = 'API-CMS';

             $e->{'log_info'} = (new Info())
                 ->setsetReferenceId('domain.com')
                 ->setDomain('domain.com')
                 ->setSessionId('hashed_session')
                 ->setLanguageCode('en')
                 ->setMemberId(1)
                 ->setUrl('/')
                 ->setIp('127.0.0.1')
                 ;

             parent::report($e);
         }

        ```

        Using this option, you can manage all exception easily because its in single place only.

LOG SAMPLE OUTPUT
-----------------

[](#log-sample-output)

If all the properties has been filled up accordingly, below is the expected log output inside `storate/logs/laravel.log`

```
[2018-03-21 07:14:56] production.ERROR: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://ws.aqzbouat.com/announcementWSs.asmx?WSDL'
{
   "app_fault":"API-SOAP",
   "message":"An error occured",
   "code":0,
   "file":"/src/Exceptions/Handler.php",
   "line":63,
   "reference_id":"3f7577e4380470f232f188565957f233d7cd69c3",
   "platform":"desktop",
   "session_id":"AA2B6A84-0DAC-420F-8D23-36DD3A99266B",
   "member_id":"12345",
   "country_code":PH,
   "language_code":"zh-hans",
   "url":"api/v2/getuser",
   "domain":"domain.com",
   "ip":"127.0.0.1",
   "request_data":{
      "operatorId":"1"
   },
   "headers":{
      "cookie":[
       "e_log_session=3f7577e4380470f232f188565957f233d7cd69c3"
      ],
      "accept-encoding":[
         "gzip, deflate"
      ],
      "referer":[
         "http://domain.com/"
      ],
      ......
   }
}

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~67 days

Total

2

Last Release

2816d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/adc411a51679c3a310528787de90f8ace9d56d5c7c20c39c4b382d7d051e7aa5?d=identicon)[redgreenyellow](/maintainers/redgreenyellow)

---

Top Contributors

[![johnturingan](https://avatars.githubusercontent.com/u/9390421?v=4)](https://github.com/johnturingan "johnturingan (5 commits)")

---

Tags

laravellogging

### Embed Badge

![Health badge](/badges/johnturingan-laravel-exception-logger/health.svg)

```
[![Health](https://phpackages.com/badges/johnturingan-laravel-exception-logger/health.svg)](https://phpackages.com/packages/johnturingan-laravel-exception-logger)
```

###  Alternatives

[pragmarx/tracker

A Laravel Visitor Tracker

2.9k300.0k1](/packages/pragmarx-tracker)[hedii/laravel-gelf-logger

A Laravel package to send logs to a gelf compatible backend like graylog

1333.4M10](/packages/hedii-laravel-gelf-logger)[melihovv/laravel-log-viewer

A Laravel log viewer

1231.5k1](/packages/melihovv-laravel-log-viewer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
