laravel-filebeat
Forked from shallowman/laravel-filebeat
Installation
Require the shallowman/laravel-filebeat
package in your composer.json
and update your dependencies:
$ composer require shallowman/laravel-filebeat
For laravel >=5.5 that's all. This package supports Laravel new Package Discovery.
Configuration
The defaults are set in config/app-log.php
. Copy this file to your own config directory to modify the values. You can publish the config using this command:
$ php artisan vendor:publish --provider="Shallowman\Log\ServiceProvider"
Note: If you want to rewrite the log path please provide a real path.
return [
'channels' => [
'filebeat' => [
'driver' => 'daily',
'path' => env('APP_LOG_PATH', '/application/logs/app.log'),
'tap' => [Shallowman\Log\LogFormatter::class],
'days' => 7,
],
],
];
Add the HandleApplicationLog middleware in the $middleware property of app/Http/Kernel.php class:
protected $middleware = [
// ...
\Shallowman\Log\HandleApplicationLog::class,
];