PHPackages                             kasan/logger-package - 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. kasan/logger-package

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

kasan/logger-package
====================

Package for store logs with RabbitMQ

1.2.1(7y ago)072MITPHPPHP &gt;=7.0.0

Since Apr 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Kasan67/RabbitLoggerPackage)[ Packagist](https://packagist.org/packages/kasan/logger-package)[ RSS](/packages/kasan-logger-package/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (14)Used By (0)

RabbitLoggerPackage
===================

[](#rabbitloggerpackage)

Introduction
------------

[](#introduction)

License
-------

[](#license)

RabbitLogger is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

Official Documentation
----------------------

[](#official-documentation)

To get started use Composer to add the package to your project's dependencies:

```
composer require kasan/logger-package

```

### Configuration

[](#configuration)

After installing the library, register the `kashirin\rabbit_mq\RabbitLoggerServiceProvider` in your `config/app.php` configuration file:

```
'providers' => [
    // Other service providers...

    kashirin\rabbit_mq\RabbitLoggerServiceProvider::class,
],
```

You will also need to add credentials in your `config/services.php` configuration file. For example:

```
'rabbit_log' => [
    'host' => 'your-rabbit-host',  //required
    'port' => 'your-rabbit-port', //required
    'user' => 'your-rabbit-user-name', //required
    'password' => 'your-rabbit-user-password',  //required
    'facility' => 'project-path-from-github', //required
    'queue' => 'your-rabbit-queue', //required
    'second_queue' => 'your-rabbit-queue',
    'exchange' => 'your-rabbit-exchange',
    'exchange_type' => 'your-rabbit-exchange-type',
    'key' => 'your-rabbit-key',
    'vhost' => 'your-rabbit-vhost'
],
```

To handle all application errors, you need to add to the file `app/Exceptions/Handler.php` these lines in the method :

```
use kashirin\rabbit_mq\Log;

public function render($request, Exception $exception)
    {
        //init and configure logger
        $config = config('services.rabbit_log');
        $logger =  new Log($config);
        $logger->error($exception);

        return parent::render($request, $exception);
    }
```

To handle all application requests and responses, you need to add to the file `app/Http/Kernel.php` this line. Recommended use its in block HTTP middlewares, but you can use it in any block.

```
protected $middleware = [
        // Other app middlewares...

        \kashirin\rabbit_mq\Middlewares\ResponseHandlerMiddleware::class,
    ];
```

### Basic Usage

[](#basic-usage)

In any place of application you can use Logger with type of methods from [PSR-3 standard](https://www.php-fig.org/psr/psr-3/)

```
use Illuminate\Http\Request;
use kashirin\rabbit_mq\Log;

/**
 * Class IndexController
 * @package App\Http\Controllers
 */
class IndexController extends Controller
{
    /**
     * @param Request $request
     * @param Log $log
     * @return array
     * @throws \AMQPChannelException
     * @throws \AMQPConnectionException
     * @throws \AMQPExchangeException
     */
    public function index(Request $request, Log $log)
    {
       $response = [];

       //some logic

       //simply message log
       $log->info('message to log');

       try {
           $data = 'some logic';
       } catch (Exception $exception) {
           //log any Throwable error or exception
           $log->error($exception);
       }

       //this type of logs except to use Response and Request objects from Laravel. Used in middleware.
       $log->log($response, $request);

       //log any JsonSerializable data
       $log->debug($data);

       return $response;
    }
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~6 days

Recently: every ~16 days

Total

13

Last Release

2879d ago

### Community

Maintainers

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

---

Top Contributors

[![Kasan67](https://avatars.githubusercontent.com/u/16354234?v=4)](https://github.com/Kasan67 "Kasan67 (1 commits)")

---

Tags

logloggingrabbit

### Embed Badge

![Health badge](/badges/kasan-logger-package/health.svg)

```
[![Health](https://phpackages.com/badges/kasan-logger-package/health.svg)](https://phpackages.com/packages/kasan-logger-package)
```

###  Alternatives

[monolog/monolog

Sends your logs to files, sockets, inboxes, databases and various web services

21.4k964.9M7.0k](/packages/monolog-monolog)[symfony/monolog-bundle

Symfony MonologBundle

2.9k249.1M1.5k](/packages/symfony-monolog-bundle)[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M271](/packages/sentry-sentry)[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k114.3M154](/packages/sentry-sentry-laravel)[rap2hpoutre/laravel-log-viewer

A Laravel log reader

3.2k14.7M70](/packages/rap2hpoutre-laravel-log-viewer)[sentry/sdk

This is a meta package of sentry/sentry. We recommend using sentry/sentry directly.

327134.8M151](/packages/sentry-sdk)

PHPackages © 2026

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