PHPackages                             wendy/monolog-aliyunlog - 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. wendy/monolog-aliyunlog

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

wendy/monolog-aliyunlog
=======================

Laravel 5.5+ aliyunlog driver for Monolog

v2.0.4(4y ago)12.8k—0%MITPHPPHP &gt;=7.0.0

Since Nov 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/wendy-rose/laravel-monolog-aliyunlog)[ Packagist](https://packagist.org/packages/wendy/monolog-aliyunlog)[ Docs](https://github.com/wendy-rose/laravel-monolog-aliyunlog.git)[ RSS](/packages/wendy-monolog-aliyunlog/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

基于阿里云日志存储的monolog
-----------------

[](#基于阿里云日志存储的monolog)

这个包主要是将laravel原本的日志储存改成储存到阿里云日志，这里如果是error错误，阿里云日志的topic统一是error，其他都是自定义（即调用laravel自带的Log工具类时给的标识），这个包只适用于laravel框架，并且版本是5.5以上

### 安装

[](#安装)

```
composer require wendy/monolog-aliyunlog

```

在`.env`中添加阿里云日志配置

```
ALIYUN_ACCESS_KEY_ID=阿里云访问密钥AccessKeyId
ALIYUN_ACCESS_KEY_SECRET=阿里云访问密钥AccessKeySecret
# https://help.aliyun.com/document_detail/29008.html
# 如杭州公网 cn-hangzhou.log.aliyuncs.com
# 如杭州内网 cn-hangzhou-intranet.log.aliyuncs.com
SLS_ENDPOINT=创建project所属区域匹配的Endpoint
SLS_PROJECT=创建的项目名称
SLS_STORE=创建的日志库名称

```

修改`config/logging.php`的`channels`

```
'channels' => [
        'stack' => [
            'driver' => 'stack',
            'channels' => ['aliyunlog'],
            'ignore_exceptions' => false,
        ],
        'aliyunlog' => [
            'driver' => 'custom',
            'via' => AliyunLogger::class
        ],
    ],
```

### 使用

[](#使用)

只需正常的使用laravel框架自带的Log工具类即可，同时错误信息也会同步到阿里云日志

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

4

Last Release

1738d ago

Major Versions

v1.1.7 → v2.0.22021-06-08

### Community

Maintainers

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

---

Tags

laravelmonologaliyunsls

### Embed Badge

![Health badge](/badges/wendy-monolog-aliyunlog/health.svg)

```
[![Health](https://phpackages.com/badges/wendy-monolog-aliyunlog/health.svg)](https://phpackages.com/packages/wendy-monolog-aliyunlog)
```

###  Alternatives

[naoray/laravel-github-monolog

Log driver to store logs as github issues

10619.4k](/packages/naoray-laravel-github-monolog)[shaffe/laravel-mail-log-channel

A package to support logging via email in Laravel

1286.2k](/packages/shaffe-laravel-mail-log-channel)[yzen.dev/mono-processor

This Processor will display in the logs bread crumbs by which you can more quickly and accurately identify the cause of the error.

116.1k](/packages/yzendev-mono-processor)

PHPackages © 2026

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