Created
April 20, 2024 06:48
-
-
Save m-ostadi/e7951390738c7e40f355d1de5f067c89 to your computer and use it in GitHub Desktop.
fluentd syslog logger config for laravel
This file contains 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
//add this to config/logging.php | |
'fluent' => [ | |
'driver' => 'monolog', | |
'level' => env('LOG_LEVEL', 'debug'), | |
'handler' => \Monolog\Handler\SyslogUdpHandler::class, | |
'handler_with' => [ | |
'host' => env('FLUENTD_SYSLOG_HOST', '127.0.0.1'), | |
'port' => env('FLUENTD_SYSLOG_PORT', ''), | |
'rfc' => \Monolog\Handler\SyslogUdpHandler::RFC3164, | |
'ident' => env('FLUENTD_SYSLOG_IDENT', 'laravel'), | |
'facility' => LOG_LOCAL1 //default => LOG_USER | |
], | |
'formatter' => \Monolog\Formatter\JsonFormatter::class, | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment