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

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

topthink/think-log
==================

think log

v2.0.1(6y ago)1210.0k↑50%5[1 issues](https://github.com/top-think/think-log/issues)4Apache-2.0PHPPHP &gt;=7.1.0

Since Dec 15Pushed 6y ago3 watchersCompare

[ Source](https://github.com/top-think/think-log)[ Packagist](https://packagist.org/packages/topthink/think-log)[ RSS](/packages/topthink-think-log/feed)WikiDiscussions 2.0 Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (4)

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

[](#think-log)

写入LOG日志，要求PHP7.1+。

主要特性
----

[](#主要特性)

- 多通道日志写入
- 日志实时/延时写入
- 日志信息格式化
- 日志信息处理机制
- JSON格式支持
- 日志自动清理

安装
--

[](#安装)

```
composer require topthink/think-log

```

用法
--

[](#用法)

```
use think\facade\Log;

Log::init([
	'default'	=>	'file',
	'channels'	=>	[
		'file'	=>	[
			'type'	=>	'file',
			'path'	=>	'./logs/',
		],
	],
]);

Log::error('error info');
Log::info('log info');
Log::save();

Log::channel('channel_name')->error('test error');
```

更多内容可以参考 [https://www.kancloud.cn/manual/thinkphp6\_0/1037616](https://www.kancloud.cn/manual/thinkphp6_0/1037616)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 63.6% 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 ~190 days

Total

4

Last Release

2506d ago

Major Versions

v1.0 → v2.0.02019-07-07

PHP version history (2 changes)v1.0PHP &gt;=5.6.0

v2.0.0PHP &gt;=7.1.0

### Community

Maintainers

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

---

Top Contributors

[![liu21st](https://avatars.githubusercontent.com/u/1111670?v=4)](https://github.com/liu21st "liu21st (7 commits)")[![big-dream](https://avatars.githubusercontent.com/u/9215157?v=4)](https://github.com/big-dream "big-dream (4 commits)")

### Embed Badge

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

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

###  Alternatives

[sentry/sentry

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

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

Monitors errors and exceptions and reports them to Rollbar

33723.7M82](/packages/rollbar-rollbar)[illuminate/log

The Illuminate Log package.

6224.3M518](/packages/illuminate-log)[open-telemetry/api

API for OpenTelemetry PHP.

1933.0M214](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2322.9M248](/packages/open-telemetry-sdk)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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