PHPackages                             hongjianghuang/aliyun-log-php-sdk - 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. hongjianghuang/aliyun-log-php-sdk

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

hongjianghuang/aliyun-log-php-sdk
=================================

Log Service SDK for PHP，used to set/get log data to Aliyun Log Service(www.aliyun.com/product/sls).

v1.1(6y ago)0110PHPPHP &gt;=7.1

Since Apr 26Pushed 6y agoCompare

[ Source](https://github.com/HongjiangHuang/aliyun-log-php-sdk)[ Packagist](https://packagist.org/packages/hongjianghuang/aliyun-log-php-sdk)[ RSS](/packages/hongjianghuang-aliyun-log-php-sdk/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Aliyun Log Service PHP SDK
==========================

[](#aliyun-log-service-php-sdk)

API VERSION
-----------

[](#api-version)

0.6.1

SDK RELEASE TIME
----------------

[](#sdk-release-time)

2018-02-18

Introduction
------------

[](#introduction)

Log Service SDK for PHP，used to set/get log data to Aliyun Log Service([www.aliyun.com/product/sls](http://www.aliyun.com/product/sls)).

API Reference: [中文](https://help.aliyun.com/document_detail/29007.html) [ENGLISH](https://www.alibabacloud.com/help/doc-detail/29007.htm)

### Use composer

[](#use-composer)

`composer require hongjianghuang/aliyun-log-php-sdk`

### Examples

[](#examples)

```
$log_item = new \Aliyun_Log_Models_LogItem();
$log_item->setTime(time());
$log_item->setContents($contents);

$endpoint = '';
$access_key_id = '';
$access_key = '';
$project = '';
$logstore = ''
$topic = 'test';
$logitems = [
    $log_item,
];

$client = new \Aliyun_Log_Client($endpoint, $access_key_id, $access_key);
$request = new \Aliyun_Log_Models_PutLogsRequest($project, $logstore, $topic, $source, $logitems);
$response = @$client->putLogs($request);
if (200 != array_get($response->getAllHeaders(), '_info.http_code')) {
    throw new \Exception('Request aliyun error');
}
```

### Summary

[](#summary)

1. Request-Request style Restful API interface
2. Use Protocol buffer to send data
3. Data can be compressed when sending to server
4. Aliyun\_Log\_Exception will be thrown if any error happen
5. Introduce simple logger for submit log easily with different levels
6. Create local log cache to submit several logs in single http post.

Environment Requirement
-----------------------

[](#environment-requirement)

1. PHP 7.1.7 and later：Master Branch
2. PHP 5.2+：[Tree v1.0](https://github.com/aliyun/aliyun-log-php-sdk/tree/v1.0)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

2260d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47dfbaa99cc16afb71885fb8159f035515b1a44ebe5161175f40a18f5786bef3?d=identicon)[AlbertHuang](/maintainers/AlbertHuang)

---

Top Contributors

[![suntingtao007](https://avatars.githubusercontent.com/u/24544188?v=4)](https://github.com/suntingtao007 "suntingtao007 (7 commits)")[![Fnck](https://avatars.githubusercontent.com/u/5467617?v=4)](https://github.com/Fnck "Fnck (2 commits)")[![mayunlei](https://avatars.githubusercontent.com/u/11693020?v=4)](https://github.com/mayunlei "mayunlei (2 commits)")[![wind1719](https://avatars.githubusercontent.com/u/5468452?v=4)](https://github.com/wind1719 "wind1719 (2 commits)")[![sandbeach](https://avatars.githubusercontent.com/u/2006325?v=4)](https://github.com/sandbeach "sandbeach (1 commits)")

### Embed Badge

![Health badge](/badges/hongjianghuang-aliyun-log-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/hongjianghuang-aliyun-log-php-sdk/health.svg)](https://phpackages.com/packages/hongjianghuang-aliyun-log-php-sdk)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M277](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

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