LaravelPackages.net
Acme Inc.
Toggle sidebar
goodjun/laravel-aliyun-log

Aliyun log for Laravel

271
3
1.0.2
About goodjun/laravel-aliyun-log

goodjun/laravel-aliyun-log is a Laravel package for aliyun log for laravel. It currently has 3 GitHub stars and 271 downloads on Packagist (latest version 1.0.2). Install it with composer require goodjun/laravel-aliyun-log. Discover more Laravel packages by goodjun or browse all Laravel packages to compare alternatives.

Last updated

Laravel Aliyun Log

Latest Version on Packagist Software License Total Downloads Github Actions

Installation

Require this package with composer.

composer require goodjun/laravel-aliyun-log

Laravel without auto-discovery:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

Goodjun\AliyunLog\AliyunLogProvider::class,

Copy the package config to your local config with the publish command:

php artisan vendor:publish  --provider="Goodjun\AliyunLog\AliyunLogProvider"

Configuration

Add your Aliyun Access Key, Key Secret, Endpoint, Project Name and Store Name to your .env:

ALIYUN_LOG_ACCESS_KEY_ID= # access key id
ALIYUN_LOG_ACCESS_KEY_SECRET= # access key secret
ALIYUN_LOG_ENDPOINT= # endpoint, reference https://help.aliyun.com/document_detail/29008.html
ALIYUN_LOG_PROJECT= # project name
ALIYUN_LOG_LOG_STORE= # store name

Usage

Laravel <= 5.5

Copy code in the bootstrap/app.php:

$app->configureMonologUsing(function (Monolog\Logger $monolog) {
    $handler = new Goodjun\AliyunLog\AliyunHandler();
    $monolog->pushHandler($handler);
});

Laravel >= 5.6

coming soon.

Comments