Skip to content

Commit

Permalink
Use env APP_NAME variable for syslog identifier (#22267)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
akaroot authored and taylorotwell committed Dec 1, 2017
1 parent a963c5f commit aea4d49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Log/LogServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

/**
Expand Down

0 comments on commit aea4d49

Please sign in to comment.