PHPackages                             iqbalatma/laravel-log-center-channel - 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. iqbalatma/laravel-log-center-channel

ActiveLibrary

iqbalatma/laravel-log-center-channel
====================================

Laravel log channel that ships logs to a centralized log management system via M2M API

1.0.0(1mo ago)09↓62.5%MITPHPPHP ^8.2

Since Jul 15Pushed 1mo agoCompare

[ Source](https://github.com/iqbalatma/laravel-log-center-channel)[ Packagist](https://packagist.org/packages/iqbalatma/laravel-log-center-channel)[ RSS](/packages/iqbalatma-laravel-log-center-channel/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel Log Center Channel
==========================

[](#laravel-log-center-channel)

A custom Laravel/Monolog log channel that ships log records to a centralized log management system over its M2M API.

How it works
------------

[](#how-it-works)

1. A global middleware (`AssignRequestId`) generates a UUID `request_id` per HTTP request and shares it as log context.
2. The `log_center` channel formats each record into a structured payload (capturing the authenticated actor, IP, endpoint, method and `request_id`**synchronously**, while the request is still alive).
3. The payload is dispatched to the queue (`SendLogToCenterJob`) and POSTed to `{base_url}/api/m2m/logs` with `X-Client-Id` / `X-Client-Secret` headers.
4. Any failure is written to the configured `fallback_channel` instead of recursing.

Install (local path package)
----------------------------

[](#install-local-path-package)

`composer.json`:

```
"repositories": [
    { "type": "path", "url": "packages/iqbalatma/laravel-log-center-channel" }
]
```

```
composer require iqbalatma/laravel-log-center-channel:@dev
php artisan vendor:publish --tag=log-center-config
```

Configure
---------

[](#configure)

Add the channel in `config/logging.php`:

```
'log_center' => [
    'driver' => 'custom',
    'via' => \Iqbalatma\LaravelLogCenterChannel\Logger::class,
    'level' => \Psr\Log\LogLevel::ERROR,
],
```

Enable it, e.g. `LOG_STACK=single,log_center` in `.env`.

### Environment

[](#environment)

```
LOG_CENTER_BASE_URL=https://logs.example.com
LOG_CENTER_CLIENT_ID=your-client-id
LOG_CENTER_CLIENT_SECRET=your-client-secret
LOG_CENTER_APP_NAME=ng-hris
LOG_CENTER_NODE_ID=            # defaults to hostname
LOG_CENTER_ENVIRONMENT=       # defaults to APP_ENV (config('app.env'))
LOG_CENTER_TIMEOUT=5
LOG_CENTER_TRIES=3
LOG_CENTER_QUEUE_CONNECTION=redis
LOG_CENTER_QUEUE=default
LOG_CENTER_FALLBACK_CHANNEL=single
```

Payload
-------

[](#payload)

`client_id`, `id`, `created_at`, `updated_at` are set by the log center itself. The channel sends:

FieldSource`message`log message`level`lowercased Monolog level`trace``context.exception` trace, if present`actor_id``auth()->id()` or `guest``actor_email`authenticated user email (nullable)`app_name``LOG_CENTER_APP_NAME``node_id``LOG_CENTER_NODE_ID` / hostname`environment``LOG_CENTER_ENVIRONMENT` / `config('app.env')``ip_address`client IP (null in console)`endpoint`request URI (null in console)`http_method`request method (null in console)`request_id`per-request UUID`logged_at`record timestamp (ISO-8601)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/35129050?v=4)[Iqbal Atma Muliawan](/maintainers/iqbalatma)[@iqbalatma](https://github.com/iqbalatma)

---

Top Contributors

[![iqbalatma](https://avatars.githubusercontent.com/u/35129050?v=4)](https://github.com/iqbalatma "iqbalatma (2 commits)")

### Embed Badge

![Health badge](/badges/iqbalatma-laravel-log-center-channel/health.svg)

```
[![Health](https://phpackages.com/badges/iqbalatma-laravel-log-center-channel/health.svg)](https://phpackages.com/packages/iqbalatma-laravel-log-center-channel)
```

PHPackages © 2026

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