dev-master
9999999-dev https://github.com/Lilocon/LaravelLogService
MIT
The Requires
- php ~5.6|~7.0
- laravel/framework ~5.1
- lokielse/aliyun-open-api-sls ^1.0
The Development Requires
by lilocon
lilocon laravellogservice
阿里云LogService的laravel集成, (*1)
Laravel/Lumen >= 5.1, (*2)
composer require "lilocon/laravel-log-service"
config/app.php
注册 ServiceProvider (Laravel 5.5 无需手动注册)'providers' => [ // ... Lilocon\LaravelLogService\ServiceProvider::class, ],
php artisan vendor:publish --provider="Lilocon\LaravelLogService\ServiceProvider"
config/log-service.php
中对应的参数即可。laravel5.5使用, (*3)
修改bootstrap/app.php文件,对应位置添加如下代码, (*4)
$app->configureMonologUsing(function ($logger) { (new Lilocon\LaravelLogService\Logging\Factory)($logger); });
laravel5.6使用, (*5)
修改config/logging.php文件, 添加自定义channel, (*6)
'LogService' => [ 'driver' => 'custom', 'via' => \Lilocon\LaravelLogService\Logging\CreateLogger::class, ],
修改app/Providers/RouteServiceProvider.php文件 添加路由即可, (*7)
Route::any('/log-service-viewer', 'Lilocon\LaravelLogService\Controller\ViewerController@index');
MIT
lilocon laravellogservice