[12.x] Add APP_NAME fallback in Slack log channel username (#6762)

The Slack log channel username falls back to the generic "Laravel Log"
when unset. This updates the fallback to use `APP_NAME` instead,
making it easier to identify which application is sending logs when
multiple Laravel apps post to the same Slack channel.

Follows the same pattern as #6755 which added an `APP_NAME` fallback
in the mail config.
This commit is contained in:
Hamed EL-Asma
2026-03-11 16:14:03 +02:00
committed by GitHub
parent 214636dd19
commit cd2bde56a0

View File

@@ -76,7 +76,7 @@ return [
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
'username' => env('LOG_SLACK_USERNAME', env('APP_NAME', 'Laravel')),
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,