Skip to content

islenbo/laravel-aliyun-sls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

laravel-aliyun-sls

Using

composer require islenbo/laravel-aliyun-sls

add service provider to app.php

<?php
use \Islenbo\LaravelAliyunSls\Providers\LaravelAliyunSlsProvider;

return [
    // ...
    'providers' => [
        /*
         * Package Service Providers...
         */
        LaravelAliyunSlsProvider::class,
    ],
    // ...
];

add config to logging.php

<?php
return [
    // ...

    // Aliyun SLS config
    'aliyun-sls' => [
        'endpoint' => env('ALIYUN_LOG_ENDPOINT'),
        'accessKeyId' => env('ALIYUN_LOG_ACCESSKEYID'),
        'accessKey' => env('ALIYUN_LOG_ACCESSKEY'),
        'project' => env('ALIYUN_LOG_PROJECT'),
        'logstore' => env('ALIYUN_LOG_LOGSTORE'),
        'bufferLimit' => env('ALIYUN_LOG_BUFFER_LIMIT', 5),
        'formatter' => \Islenbo\LaravelAliyunSls\Formatters\AliyunSlsFormatter::class
    ],

    // ...
    'channels' => [
        'stack' => [
            'driver' => 'stack',
            // assign aliyun-sls
            'channels' => ['aliyun-sls'],
            'ignore_exceptions' => false,
            'tap' => [
            ]
        ],
        // ...
    ],
];

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages