Skip to content

Instantly share code, notes, and snippets.

@m-ostadi
Created April 20, 2024 06:48
Show Gist options
  • Save m-ostadi/e7951390738c7e40f355d1de5f067c89 to your computer and use it in GitHub Desktop.
Save m-ostadi/e7951390738c7e40f355d1de5f067c89 to your computer and use it in GitHub Desktop.
fluentd syslog logger config for laravel
//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