New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ravaelles/laravel-filebeat

The middleware for application log with json format and correspond to filebeat log collection
4,923
Install
composer require ravaelles/laravel-filebeat
Latest Version:v1.3.0
PHP:>=7
Laravel:5
License:MIT
Last Updated:Sep 18, 2019
Links: GitHub  ·  Packagist
Maintainer: Ravaelles

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,
];

Related Packages

jfadich/json-property

Transform an object property into an enhanced array

458 3
soloslee/json-response

JSON-API response for Laravel

92 8
sergiq/laravellog

Simple laravel log

11,944 0
yadakhov/json

A simple wrapper class to work with json in PHP.

8,393 16
coolonce/logger-interface

This package allows you to send data for logging to the HTTP daemon associated w...

4,640 1

Version History

Version Released PHP Laravel License
v1.3.0 >=7 5.6.x|5.7.x MIT
v1.2.0 >=7 5.6.x|5.7.x MIT
v1.1.0 >=7 5.6.x|5.7.x MIT
v1.0.0 >=7 5.5.x|5.6.x|5.7.x MIT