Skip to content

jobilla/monolog-json-logging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
Jul 26, 2022
Jul 26, 2022
Jul 26, 2022
Jul 26, 2022
Jul 26, 2022

Repository files navigation

monolog-json-logging

Configure and setup JSON formatting for monolog

Usage

The example below is for Laravel, change as appropriate for your needs

Laravel

In the config/logging.php file, tap the UseJsonFormatting::class on the logging channel you want, as shown below.

'stdout' => [
    'driver' => 'monolog',
    'handler' => StreamHandler::class,
    'with' => [
        'stream' => 'php://stdout',
    ],
    'tap' => [\Jobilla\CloudNative\Monolog\UseJsonFormatting::class],
],

About

Configure and setup JSON formatting for monolog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages