Looking to hire Laravel developers? Try LaraJobs

laravel-json-formatter maintained by keerill

Description
JsonFormatter for Laravel Octane
Author
Last update
2024/01/22 23:53 (dev-main)
License
Downloads
5

Comments
comments powered by Disqus

JsonFormatter for Laravel Octane

Latest Version on Packagist Total Downloads

This package allows you to format JSON logs for Laravel Octane RoadRunner server.

Installation

You can install the package via composer:

composer require keerill/laravel-json-formatter

You can publish and run the migrations with:

Usage

Environment

LOG_CHANNEL=stderr
LOG_STDERR_FORMATTER="\\Keerill\\LaravelJsonFormatter\\LaravelJsonFormatter"

Config

// config/logging.php
return [
    'channels' => [
        'stderr' => [
            'driver' => 'monolog',
            'handler' => StreamHandler::class,
            'formatter' => Keerill\LaravelJsonFormatter\LaravelJsonFormatter::class,
            'with' => [
                'stream' => 'php://stderr',
            ],
        ],
    ],
]

License

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