PHPackages                             rrbrr/think-rlog - 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. rrbrr/think-rlog

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

rrbrr/think-rlog
================

An log library in ThinkPHP 6.

v1.2.2(2y ago)212Apache-2.0PHPPHP &gt;=7.1.0

Since Jan 10Pushed 2y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

 ThinkPHP rlog
===============

[](#----thinkphp--rlog)

 **think-rlog 是个新项目上手神器，对于入库新公司的项目或二开项目时，不了解业务数据逻辑。 可以使用它记录所有请求信息，响应信息，以及执行的sql语句。**

[![ijiangtao](https://github.com/caoygx/think-rlog/raw/master/preview.png?raw=true)](https://github.com/caoygx/think-rlog/blob/master/preview.png?raw=true)

使用方法
----

[](#使用方法)

1. 使用`composer`安装库：

```
composer require rbrr/think-rlog

```

2. 添加事件监听,在应用全局事件文件event.php中加入

```
    'listen' => [
        'AppInit'     => ['tlog\listener\WriteRequestLog'],
        'HttpRun'     => [],
        'HttpEnd'     => ['tlog\listener\WriteResponseLog'],
    ]
```

如果没有建立日志表，可以手工执行命令

```
php think tlog:publish

```

这将自动生成 `log_request` 和 `log_curl` 表。

如果没有这个命令可以尝试手工注册下面的服务

在应用的全局公共文件service.php中加入：

```
return [
    // ...

    tlog\tlogService::class,
];
```

#### 如果只想某些ip请求才记录日志，可以指定白名单ip

[](#如果只想某些ip请求才记录日志可以指定白名单ip)

在应用的配置文件 app.php 中加入 \[ 'rlog'=&gt;\[ 'white\_list'=&gt;'127.0.0.1','192.168.1.8' //指定需要记录请求信息的ip \] \]

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Total

5

Last Release

851d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7159843?v=4)[caoygx](/maintainers/caoygx)[@caoygx](https://github.com/caoygx)

---

Tags

logthinkphp

### Embed Badge

![Health badge](/badges/rrbrr-think-rlog/health.svg)

```
[![Health](https://phpackages.com/badges/rrbrr-think-rlog/health.svg)](https://phpackages.com/packages/rrbrr-think-rlog)
```

###  Alternatives

[monolog/monolog

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

21.4k964.9M7.0k](/packages/monolog-monolog)[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[symfony/monolog-bundle

Symfony MonologBundle

2.9k249.1M1.6k](/packages/symfony-monolog-bundle)[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[sentry/sentry

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

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

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

1.3k114.3M154](/packages/sentry-sentry-laravel)

PHPackages © 2026

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