PHPackages                             salehhub/laravel-remote-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. salehhub/laravel-remote-logger

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

salehhub/laravel-remote-logger
==============================

Send Laravel logs to a centralized remote logging server

v1.0.8(2mo ago)0553↓50%MITPHPPHP ^8.1

Since Feb 9Pushed 2mo agoCompare

[ Source](https://github.com/SalehHub/laravel-remote-logger)[ Packagist](https://packagist.org/packages/salehhub/laravel-remote-logger)[ RSS](/packages/salehhub-laravel-remote-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (10)Used By (0)

Laravel Remote Logger
=====================

[](#laravel-remote-logger)

Send your Laravel application logs to a centralized remote logging server.

Features
--------

[](#features)

- Zero config — just install, set env vars, and go
- Bearer token authentication
- Asynchronous logging (queued) to avoid slowing down requests
- Automatic retry on failure (3 attempts with backoff)
- Configurable timeout and SSL verification
- Fallback to local logging on failure

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

[](#installation)

```
composer require salehhub/laravel-remote-logger
```

The package auto-registers via Laravel's package discovery.

Configuration
-------------

[](#configuration)

### 1. Add Environment Variables

[](#1-add-environment-variables)

```
REMOTE_LOGGER_URL=https://your-logging-server.com/api/logs
REMOTE_LOGGER_API_KEY=your-api-key
REMOTE_LOGGER_APP_NAME=MyApp
```

All available environment variables:

VariableDefaultDescription`REMOTE_LOGGER_URL``http://localhost:8000/api/logs`Remote server endpoint`REMOTE_LOGGER_API_KEY``null`Bearer token for authentication`REMOTE_LOGGER_APP_NAME``APP_NAME`Application identifier`REMOTE_LOGGER_LEVEL``debug`Minimum log level to send`REMOTE_LOGGER_ASYNC``true`Send logs via queue`REMOTE_LOGGER_QUEUE``null`Queue name (null = default queue)`REMOTE_LOGGER_VERIFY_SSL``true`Verify SSL certificates`REMOTE_LOGGER_TIMEOUT``5`HTTP request timeout in seconds### 2. Set as Default Log Channel

[](#2-set-as-default-log-channel)

```
LOG_CHANNEL=remote
```

The `remote` channel is auto-registered by the package. No need to edit `config/logging.php`.

### 3. Queue Setup (for async logging)

[](#3-queue-setup-for-async-logging)

```
php artisan queue:work
```

Usage
-----

[](#usage)

```
use Illuminate\Support\Facades\Log;

Log::info('User logged in', ['user_id' => 123, 'category' => 'Auth', 'subcategory' => 'Login']);
Log::error('Payment failed', ['order_id' => 456, 'category' => 'Payments', 'subcategory' => 'Stripe']);
Log::warning('High memory usage detected', ['category' => 'System']);
```

### Global Context (Optional)

[](#global-context-optional)

You can set a global category or subcategory that applies to all logs in the current request or job. This is useful for assigning a broad category to an entire request cycle.

```
use RemoteLogger\Facades\RemoteLogger;

// At the beginning of a request or job
RemoteLogger::setContext('Billing', 'StripeProvider');

// Or separately
RemoteLogger::setCategory('Billing');
RemoteLogger::setSubcategory('StripeProvider');
```

Global settings (via `RemoteLogger` facade) will always take precedence over values provided in the log context.

Remote Server Payload
---------------------

[](#remote-server-payload)

Your server should accept POST requests with this JSON structure:

```
{
    "application": "MyApp",
    "environment": "production",
    "level": "info",
    "message": "User logged in",
    "category": "Auth",
    "subcategory": "Login",
    "context": {"user_id": 123},
    "logged_at": "2024-02-08 10:30:00"
}
```

The request includes an `Authorization: Bearer ` header when `REMOTE_LOGGER_API_KEY` is set.

Publishing Config
-----------------

[](#publishing-config)

```
php artisan vendor:publish --tag=remote-logger-config
```

Synchronous Mode
----------------

[](#synchronous-mode)

Set `REMOTE_LOGGER_ASYNC=false` to send logs synchronously (not recommended for production).

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance83

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Total

9

Last Release

85d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0212b8acc3ff84bade810d64dcbc1bc483ae6f69cce630addb9ce8b93b3c026b?d=identicon)[SalehHub](/maintainers/SalehHub)

---

Top Contributors

[![SalehHub](https://avatars.githubusercontent.com/u/7434624?v=4)](https://github.com/SalehHub "SalehHub (13 commits)")

---

Tags

laravelloggingremotecentralized

### Embed Badge

![Health badge](/badges/salehhub-laravel-remote-logger/health.svg)

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

###  Alternatives

[shaffe/laravel-mail-log-channel

A package to support logging via email in Laravel

1286.2k](/packages/shaffe-laravel-mail-log-channel)[naoray/laravel-github-monolog

Log driver to store logs as github issues

10619.4k](/packages/naoray-laravel-github-monolog)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)

PHPackages © 2026

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