PHPackages                             yangshuanlin/thinkphp-log-elasticsearch - 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. yangshuanlin/thinkphp-log-elasticsearch

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

yangshuanlin/thinkphp-log-elasticsearch
=======================================

将thinphp 5.1日志推送到elasticsearch

v1.0.6(6y ago)1921Apache-2.0PHP

Since Oct 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/yangshuanlin/thinkphp-log-elasticsearch)[ Packagist](https://packagist.org/packages/yangshuanlin/thinkphp-log-elasticsearch)[ RSS](/packages/yangshuanlin-thinkphp-log-elasticsearch/feed)WikiDiscussions master Synced 2mo ago

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

thinkphp-log-elasticsearch
==========================

[](#thinkphp-log-elasticsearch)

将thinphp 5.1日志推送到elasticsearch

版本说明
====

[](#版本说明)

使用
==

[](#使用)

- 在config/log.php里面配置

```
return [
    // 日志记录方式，内置 file socket 支持扩展
    'type'        => 'Elasticsearch',
    'host'        =>'http://127.0.0.1:9200/local/', //local为索引名称，可以根据自己的需要更换
    // 日志保存目录
    'path'        => '',
    // 日志记录级别
    'level'       => ['debug','info','notice','warning','error','critical','alert','emergency','sql'],
    // 单文件日志写入
    'single'      => false,
    // 独立日志级别
    'apart_level' => ['sql','error'],
    // 最大日志文件数量
    'max_files'   => 0,
    // 是否关闭日志写入
    'close'       => false,
    'json'	=>	true
];

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

4

Last Release

2385d ago

### Community

Maintainers

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

---

Top Contributors

[![19js](https://avatars.githubusercontent.com/u/32995060?v=4)](https://github.com/19js "19js (10 commits)")

### Embed Badge

![Health badge](/badges/yangshuanlin-thinkphp-log-elasticsearch/health.svg)

```
[![Health](https://phpackages.com/badges/yangshuanlin-thinkphp-log-elasticsearch/health.svg)](https://phpackages.com/packages/yangshuanlin-thinkphp-log-elasticsearch)
```

###  Alternatives

[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[open-telemetry/api

API for OpenTelemetry PHP.

1833.0M214](/packages/open-telemetry-api)[codemix/yii2-streamlog

A Yii 2 log target for streams in URL format

531.4M6](/packages/codemix-yii2-streamlog)

PHPackages © 2026

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