PHPackages                             olivefm/laravel-sls - 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. olivefm/laravel-sls

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

olivefm/laravel-sls
===================

Aliyun SLS Log For Laravel,lumen

v1.0.0(9y ago)074MITPHPPHP ~5.5|~7.0

Since Jul 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/yeesuu/laravel-sls)[ Packagist](https://packagist.org/packages/olivefm/laravel-sls)[ Docs](https://github.com/lokielse/laravel-sls)[ RSS](/packages/olivefm-laravel-sls/feed)WikiDiscussions master Synced 3w ago

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

Aliyun SLS Log For Laravel，Lumen
================================

[](#aliyun-sls-log-for-laravellumen)

- [lokielse/laravel-sls](https://github.com/lokielse/laravel-sls)的分支，修改了一些代码支持lumen [![Latest Version on Packagist](https://camo.githubusercontent.com/07f3ce4f46b0db0f87d5f8d4bdd01474b30421c80a989332c2cbf5b8da180bc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6b69656c73652f6c61726176656c2d736c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lokielse/laravel-sls)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/c6b385f9bb61fcf2966e5bb97c0ea8ed2ed1c5685951a98dbeecf40e7a5ed213/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6b69656c73652f6c61726176656c2d736c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lokielse/laravel-sls)

Install
-------

[](#install)

Via Composer

```
$ composer require olivefm/laravel-sls
```

Config
------

[](#config)

Add following service providers into your providers array in `config/app.php`

```
Lokielse\LaravelSLS\LaravelSLSServiceProvider::class
```

Copy `sls.php` to `config` folder

For Lumen

Add following code into in `bootstrap/app.php`

```
$app->configure("sls");
```

Replace `Log` alias in your `config/app.php` (Optional)

```
//'Log'               => Illuminate\Support\Facades\Log::class,
'Log'                 => Lokielse\LaravelSLS\Facades\WriterFacade::class,
'SLSLog'              => Lokielse\LaravelSLS\Facades\LogFacade::class,
```

Edit your `.env` file

```
ALIYUN_ACCESS_KEY_ID=...
ALIYUN_ACCESS_KEY_SECRET=...
# https://help.aliyun.com/document_detail/29008.html
# 如杭州公网 cn-hangzhou.log.aliyuncs.com
# 如杭州内网 cn-hangzhou-intranet.log.aliyuncs.com
SLS_ENDPOINT=cn-hangzhou.log.aliyuncs.com
SLS_PROJECT=test-project
SLS_STORE=test-store
```

You should update `SLS_ENDPOINT` to `internal endpoint` in production mode

Usage
-----

[](#usage)

First create a project and store at [Aliyun SLS Console](https://sls.console.aliyun.com/)

Then update `SLS_ENDPOINT`, `SLS_PROJECT`, `SLS_STORE` in `.env`

Push a test message to queue

```
Log::info('Test Message', ['foobar'=>'2003']);

//or you can use `app('sls')`

app('sls')->putLogs([
	'type' => 'test',
	'message' => json_encode(['This should use json_encode'])
]);

//or you can use `SLSLog` directly

SLSLog::putLogs([
	'type' => 'test',
	'message' => json_encode(['This should use json_encode'])
]);
```

Security
--------

[](#security)

Create RAM access control at [Aliyun RAM Console](https://ram.console.aliyun.com)

1. Create a custom policy such as `AliyunSLSFullAccessFoobar`

    ```
    {
      "Version": "1",
      "Statement": [
    	{
    	  "Action": "log:*",
    	  "Resource": [
    		"acs:log:*:*:project/test-project/logstore/test-store",
    	  ],
    	  "Effect": "Allow"
    	}
      ]
    }

    ```
2. Create a user for you app such as `foobar`
3. Assign the policy `AliyunSLSFullAccessFoobar` to the user `foobar`
4. Create and get the `AccessKeyId` and `AccessKeySecret` for user `foorbar`
5. update `QUEUE_SLS_ACCESS_KEY` and `QUEUE_SLS_ACCESS_SECRET` in `.env`

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Credits
-------

[](#credits)

- [Loki Else](https://github.com/lokielse)
- [abrahamgreyson](https://github.com/abrahamgreyson/laravel-sls)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3627d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

loglaravelclouddriveraliyunSLSlokielselaravel-sls

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/olivefm-laravel-sls/health.svg)

```
[![Health](https://phpackages.com/badges/olivefm-laravel-sls/health.svg)](https://phpackages.com/packages/olivefm-laravel-sls)
```

###  Alternatives

[lokielse/laravel-sls

Aliyun SLS Log For Laravel

213.7k](/packages/lokielse-laravel-sls)[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k122.6M185](/packages/sentry-sentry-laravel)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299571.0k1](/packages/larabug-larabug)[spatie/laravel-flare

Send Laravel errors to Flare

111.2M6](/packages/spatie-laravel-flare)[kitloong/laravel-app-logger

Laravel log for your application

101.3M8](/packages/kitloong-laravel-app-logger)[lokielse/laravel-mns

Aliyun MNS Queue Driver For Laravel

2614.9k](/packages/lokielse-laravel-mns)

PHPackages © 2026

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