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)074↓100%MITPHPPHP ~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 1mo 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 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

3581d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e35c99fb3487901a32ce6fb52d94dfc246604cdad17f7fb38e9188ba7139002?d=identicon)[yeesuu](/maintainers/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

223.7k](/packages/lokielse-laravel-sls)[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[larabug/larabug

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

299549.3k1](/packages/larabug-larabug)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)

PHPackages © 2026

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