From aea4d493bd61689ac605d1d8ef4cea067ea26954 Mon Sep 17 00:00:00 2001 From: akaroot Date: Fri, 1 Dec 2017 15:50:01 +0200 Subject: [PATCH] Use env APP_NAME variable for syslog identifier (#22267) * Use env APP_NAME variable for syslog identifier Instead of hardcoded syslog identifier "laravel" I propose to use environment variable APP_NAME. In case when you have a few Laravel projects on the same machine that log to syslog all of them will write to log with same identifier "laravel" thats not very transparent which message belongs to which project * use config variable instead of environment * Update LogServiceProvider.php --- src/Illuminate/Log/LogServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Log/LogServiceProvider.php b/src/Illuminate/Log/LogServiceProvider.php index 700bb6e166b5..306284d68a73 100644 --- a/src/Illuminate/Log/LogServiceProvider.php +++ b/src/Illuminate/Log/LogServiceProvider.php @@ -101,7 +101,7 @@ protected function configureDailyHandler(Writer $log) */ protected function configureSyslogHandler(Writer $log) { - $log->useSyslog('laravel', $this->logLevel()); + $log->useSyslog($this->app->make('config')->get('app.name'), $this->logLevel()); } /**