keerill / laravel-json-formatter
JsonFormatter for Laravel Octane
v1.1.0
2024-01-22 22:53 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- laravel/octane: ^2.3
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
README
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.