PHPackages                             ylxp/think-aliyunsls - 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. ylxp/think-aliyunsls

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

ylxp/think-aliyunsls
====================

Aliyun sls log driver for thinkphp 5

00PHP

Since Aug 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jhansin-zhang/aliyun)[ Packagist](https://packagist.org/packages/ylxp/think-aliyunsls)[ RSS](/packages/ylxp-think-aliyunsls/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

think-aliyunsls
===============

[](#think-aliyunsls)

[![](https://camo.githubusercontent.com/03cbb73de76def6038eaa8b7ba0a22abbf3061afb0e165a56a60ed29551f61f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746c696e67632f7468696e6b2d616c6979756e736c732e737667)](https://packagist.org/packages/tlingc/think-aliyunsls)[![](https://camo.githubusercontent.com/c185430b27f72c1e5bf74bf3188715ab5231cb1b4e62c608f5ea8353c6b0a35f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746c696e67632f7468696e6b2d616c6979756e736c732e737667)](https://packagist.org/packages/tlingc/think-aliyunsls)[![](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE.md)

ThinkPHP 6 阿里云日志服务日志驱动

安装
--

[](#安装)

```
composer require ylxp/think-aliyunsls

```

配置
--

[](#配置)

config/log.php

```
// 默认日志记录通道
'default'      => 'aliyunsls',
// 日志通道列表
'channels'     => [
    'aliyunsls' => [
        // 日志记录方式
        'type' => 'Aliyunsls',
        // 阿里云 endpoint
        'endpoint' => 'http://cn-beijing.sls.aliyuncs.com/',
        // 阿里云 AccessKey ID
        'access_key_id' => '',
        // 阿里云 AccessKey Secret
        'access_key_secret' => '',
        // 项目名称
        'project' => '',
        // logstore 名称
        'logstore' => '',
        // source 标识
        'source' => '',
        // topic 标识
        'topic' => '',
        // 日志处理
        'processor' => null,
        // 关闭通道日志写入
        'close' => false,
        // 使用JSON格式记录
        'json' => true,
        // 是否实时写入
        'realtime_write' => false,
    ],
]
```

协议
--

[](#协议)

MIT

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

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.

### Community

Maintainers

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

---

Top Contributors

[![jhansin-zhang](https://avatars.githubusercontent.com/u/52953730?v=4)](https://github.com/jhansin-zhang "jhansin-zhang (3 commits)")

### Embed Badge

![Health badge](/badges/ylxp-think-aliyunsls/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[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)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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