The middleware for application log with json format and correspond to filebeat log collection

v1.4.0 2019-03-14 09:56 UTC

This package is auto-updated.

Last update: 2022-05-14 17:19:15 UTC



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.


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 = [
    // ...