PHPackages                             reaway/think-log - 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. reaway/think-log

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

reaway/think-log
================

think log

v8.0.0(3mo ago)013Apache-2.0PHPPHP &gt;=8.0

Since Mar 9Pushed 3mo agoCompare

[ Source](https://github.com/reaway/think-log)[ Packagist](https://packagist.org/packages/reaway/think-log)[ Docs](https://github.com/reaway/think-log)[ RSS](/packages/reaway-think-log/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (8)Versions (4)Used By (0)

think-log
=========

[](#think-log)

安装
--

[](#安装)

```
composer require reaway/think-log
```

用法
--

[](#用法)

```
use Think\Component\Log\Facade\LogFacade;

require __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

LogFacade::setConfig([
    // 默认日志记录通道
    'default' => 'file',
    // 日志记录级别
    'level' => [],
    // 日志类型记录的通道 ['error'=>'email',...]
    'type_channel' => [],
    // 关闭全局日志写入
    'close' => false,
    // 全局日志处理 支持闭包
    'processor' => null,

    // 日志通道列表
    'channels' => [
        'file' => [
            // 日志记录方式
            'type' => 'File',
            // 日志保存目录
            'path' => __DIR__ . DIRECTORY_SEPARATOR . 'log',
            // 单文件日志写入
            'single' => false,
            // 独立日志级别
            'apart_level' => [],
            // 最大日志文件数量
            'max_files' => 0,
            // 使用JSON格式记录
            'json' => false,
            // 日志处理
            'processor' => null,
            // 关闭通道日志写入
            'close' => false,
            // 日志输出格式化
            'format' => '[%s][%s] %s',
            // 是否实时写入
            'realtime_write' => false,
        ],
        // 其它日志通道配置
    ],
]);

LogFacade::record('测试日志信息，这是警告级别', 'notice');
LogFacade::write('测试日志信息，这是警告级别，并且实时写入', 'notice');
```

文档
--

[](#文档)

详细参考 [日志处理](https://www.kancloud.cn/manual/thinkphp6_0/1037616)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance78

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

Total

3

Last Release

116d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/reaway-think-log/health.svg)

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

###  Alternatives

[sentry/sentry

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

1.9k247.1M335](/packages/sentry-sentry)[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k373.5M3.3k](/packages/symfony-cache)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.3M623](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k51](/packages/ecotone-ecotone)

PHPackages © 2026

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