PHPackages                             gomagaming/logs - 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. gomagaming/logs

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

gomagaming/logs
===============

Register logs into GomaGaming Backend Service

0.0.41(3y ago)01.3k1MITPHP

Since Feb 16Pushed 3y ago3 watchersCompare

[ Source](https://github.com/gomagaming/logs)[ Packagist](https://packagist.org/packages/gomagaming/logs)[ RSS](/packages/gomagaming-logs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (50)Used By (1)

GomaGaming Logs for Laravel/Lumen
=================================

[](#gomagaming-logs-for-laravellumen)

Description
-----------

[](#description)

- GomaGaming Logs tracks Exceptions, Requests and Responses and Custom logs and sends it to a specific queue with meta data associated (paths, parameters, headers, etc), which can then be properly treated.

Laravel Version Compatibility
-----------------------------

[](#laravel-version-compatibility)

- Laravel `>= 8.x.x` on PHP `>= 7.3`

Lumen Version Compatibility
---------------------------

[](#lumen-version-compatibility)

- Lumen `>= 8.x.x` on PHP `>= 7.3`

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

[](#installation)

```
    composer require gomagaming/logs

```

### Lumen Only

[](#lumen-only)

Add GomaGamingLogsServiceProvider to bootstrap/app.php:

```
    $app->register(GomaGaming\Logs\GomaGamingLogsServiceProvider::class);

```

Configuration file
------------------

[](#configuration-file)

By default all logs are being sent to a queue called 'logs', but can be changed in config file gomagaminglogs.php

### Lumen only:

[](#lumen-only-1)

```
    cp vendor/gomagaming/logs/config/gomagaminglogs.php config/gomagaminglogs.php

```

Usage
-----

[](#usage)

Enable capturing unhandled exception by making the following change to App/Exceptions/Handler.php:

Laravel:

```
    use GomaGaming\Logs\GomaGamingLogs;

    public function register()
    {
        $this->reportable(function (Throwable $e) {

            if ($this->shouldReport($e)) {
                GomaGamingLogs::error($e->getMessage());
            }

        });
    }

```

Lumen:

```
    use GomaGaming\Logs\GomaGamingLogs;

    public function report(Throwable $exception)
    {
        if ($this->shouldReport($exception)) {
            GomaGamingLogs::error($exception->getMessage());
        }

        parent::report($exception);
    }

```

To capture information about all incoming requests or all responses, add the following middleware as global or apply it to a group:

In Laravel add it to app/Http/Kernel.php:

```
    protected $middleware = [
        (...)
        \GomaGaming\Logs\Http\Middleware\LogRequests::class,
        \GomaGaming\Logs\Http\Middleware\LogResponses::class,
    ];

```

In Lumen add it to bootstarp/app.php:

```
    $app->middleware([
        \GomaGaming\Logs\Http\Middleware\LogRequests::class,
        \GomaGaming\Logs\Http\Middleware\LogResponses::class
    ]);

```

Custom errors or informations can also be reported:

```
    use GomaGaming\Logs\GomaGamingLogs;

    GomaGamingLogs::info("This is an information about my service.");
    GomaGamingLogs::error("This is an error ocurring in my service");

```

For API's that don't want to give users information about exceptions, we can change render method in App/Exceptions/Handler.php to return always http code 500 with a custom message, example:

```
    public function render($request, Throwable $exception)
    {
        (...)

        //might want to check if request is asking for json response

        return response()->json(['status' => 'error', 'msg' => 'Internal Server Error'], 500);
    }

```

TODO
----

[](#todo)

Tests

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~5 days

Recently: every ~23 days

Total

41

Last Release

1319d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c1a638471f1c0c46c082e7e205c96a54871f3e91d6a690c1167ceb73bcb23e0?d=identicon)[gomadeve](/maintainers/gomadeve)

---

Top Contributors

[![joaoccmatos](https://avatars.githubusercontent.com/u/1299575?v=4)](https://github.com/joaoccmatos "joaoccmatos (40 commits)")[![AdrianoRamalho21](https://avatars.githubusercontent.com/u/28606824?v=4)](https://github.com/AdrianoRamalho21 "AdrianoRamalho21 (15 commits)")[![miguelmaia33](https://avatars.githubusercontent.com/u/54990298?v=4)](https://github.com/miguelmaia33 "miguelmaia33 (5 commits)")

### Embed Badge

![Health badge](/badges/gomagaming-logs/health.svg)

```
[![Health](https://phpackages.com/badges/gomagaming-logs/health.svg)](https://phpackages.com/packages/gomagaming-logs)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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