PHPackages                             ccily2701/laravel-redis-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. ccily2701/laravel-redis-logger

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

ccily2701/laravel-redis-logger
==============================

Laravel 6 log channel that pushes logs into Redis for Logstash/ES, multi-project support

v1.0.0(9mo ago)0193↓87.5%MITPHPPHP &gt;=7.4

Since Sep 5Pushed 9mo agoCompare

[ Source](https://github.com/ccily2701/laravel-redis-logger)[ Packagist](https://packagist.org/packages/ccily2701/laravel-redis-logger)[ RSS](/packages/ccily2701-laravel-redis-logger/feed)WikiDiscussions main Synced 3w ago

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

Laravel Redis Logger
====================

[](#laravel-redis-logger)

一个 Laravel 6 的日志扩展包，将日志写入独立 Redis（不影响项目原有缓存/队列），方便 Logstash/ES 采集。

安装
--

[](#安装)

composer require ccily2701/laravel-redis-logger

发布配置文件
------

[](#发布配置文件)

```
php artisan vendor:publish --provider="Ccily2701\LaravelRedisLogger\RedisLoggerServiceProvider" --tag="config"

```

发布后会在 config/redis-logger.php 生成配置文件，你可以修改日志 Redis 的参数：

REDIS\_LOGGER\_HOST=127.0.0.1 REDIS\_LOGGER\_PORT=6379 REDIS\_LOGGER\_PASSWORD=你的密码 REDIS\_LOGGER\_DB=1 REDIS\_LOGGER\_KEY\_PREFIX=laravel:logs

- REDIS\_LOGGER\_DB 可以设置为独立数据库，避免影响应用缓存或队列
- REDIS\_LOGGER\_KEY\_PREFIX 用于生成 Redis key，例如：laravel:logs:APP\_NAME

修改 logging.php
--------------

[](#修改-loggingphp)

在 config/logging.php 的 channels 数组中添加：

```
'channels' => [
    // 其他 channel...
    'redis' => [
        'driver'  => 'monolog',
        'level'   => 'debug',
        'handler' => \Ccily2701\LaravelRedisLogger\RedisLogHandler::class,
    ],
],

```

- 这里 handler 指向包自带的 RedisLogHandler

使用日志
----

[](#使用日志)

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

Log::channel('redis')->info('这是一条测试日志');

Log::channel('redis')->error('用户登录失败', ['user_id' => 123, 'ip' => request()->ip()]);

```

- 日志会写入独立 Redis（默认 db=1）
- Redis key 格式：laravel:logs:{APP\_NAME}
- Logstash 可直接消费该 key 写入 Elasticsearch

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance56

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

294d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/ccily2701-laravel-redis-logger/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[illuminate/log

The Illuminate Log package.

6225.0M602](/packages/illuminate-log)[mateusjunges/laravel-kafka

A kafka driver for laravel

7243.4M20](/packages/mateusjunges-laravel-kafka)[grkamil/laravel-telegram-logging

Send logs to Telegram chat via Telegram bot

161493.0k](/packages/grkamil-laravel-telegram-logging)[honeybadger-io/honeybadger-laravel

Honeybadger Laravel integration

431.3M](/packages/honeybadger-io-honeybadger-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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