Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-filebeat maintained by lucasrolff

Description
The middleware for application log with json format and correspond to filebeat log collection
Authors
Last update
2019/03/14 10:56 (dev-master)
License
Links
Downloads
6
Tags

Comments
comments powered by Disqus

laravel-filebeat

Installation

Require the lucasrolff/laravel-filebeat package in your composer.json and update your dependencies:

$ composer require lucasrolff/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="Lucasrolff\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' => [Lucasrolff\Log\LogFormatter::class],
            'days' => 7,
        ],
    ],
];

Add the HandleApplicationLog middleware in the $middleware property of app/Http/Kernel.php class:

protected $middleware = [
    // ...
    \Lucasrolff\Log\HandleApplicationLog::class,
];