New

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

vmorozov/laravel-json-log-formatter

Package to quickly set up log formatter in json format that is supported by elk stack
2,260
Install
composer require vmorozov/laravel-json-log-formatter
Latest Version:v1.0.2
PHP:^8.1
Laravel:8 – 12
License:MIT
Last Updated:Apr 20, 2026
Links: GitHub  ·  Packagist
Maintainer: vmorozov

Package to quickly set up log formatter in json format that is supported by elk stack

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

composer require vmorozov/laravel-json-log-formatter

You can publish the config file with:

php artisan vendor:publish --tag="json-log-formatter-config"

Add the following to your config/logging.php file to the channel that you want in json format:

'formatter' => \VMorozov\LaravelJsonLogFormatter\JsonLogsFormatter::class,

for example for 'daily' channel it should look like this:

'daily' => [
    'driver' => 'daily',
    'path' => storage_path('logs/laravel.log'),
    'level' => env('LOG_LEVEL', 'debug'),
    'days' => env('LOG_DAILY_DAYS', 15),
    'replace_placeholders' => true,
    'formatter' => \VMorozov\LaravelJsonLogFormatter\JsonLogsFormatter::class,
],

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

407,699,310 4,663

Version History

Version Released PHP Laravel License
v1.0.2 ^8.1 >=8.0 MIT
v1.0.1 ^8.1 >=8.0 MIT
v1.0 ^8.1 >=8.0 MIT