Created
May 12, 2019 08:58
-
-
Save SohanChy/fdfd84b8d40dc851b567a2185be19abd to your computer and use it in GitHub Desktop.
Configuring Laravel for JSON Logging Using Monolog (For Kibana)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
'channels' => [ | |
'stack' => [ | |
'driver' => 'stack', | |
'channels' => ['single'], | |
], | |
'single' => [ | |
'driver' => 'monolog', | |
'path' => storage_path('logs/laravel.log'), | |
'level' => 'debug', | |
'handler' => Monolog\Handler\RotatingFileHandler::class, | |
'with' => [ | |
'filename' => storage_path('logs/app.log') | |
], | |
'formatter' => Monolog\Formatter\JsonFormatter::class, | |
'formatter_with' => [ | |
'dateFormat' => 'Y-m-d', | |
], | |
], | |
... | |
] | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment