Skip to content

Register the browser-logs route only when the browser logs watcher is enabled - #993

Merged
pushpak1300 merged 1 commit into
laravel:mainfrom
sulimanbenhalim:fix/browser-logs-route-when-disabled
Sep 3, 2026
Merged

Register the browser-logs route only when the browser logs watcher is enabled#993
pushpak1300 merged 1 commit into
laravel:mainfrom
sulimanbenhalim:fix/browser-logs-route-when-disabled

Conversation

@sulimanbenhalim

Copy link
Copy Markdown
Contributor

registerRoutes() runs outside the browser_logs_watcher guard but registerBrowserLogger() runs inside it so turning the watcher off still leaves POST /_boost/browser-logs registered with no browser log channel behind it. any POST to it 500s and drops a laravel.EMERGENCY entry with a full stack trace into laravel.log

tried it on a fresh laravel app with BOOST_BROWSER_LOGS_WATCHER=false, route:list still shows the route and posting to it returns 500 plus "Unable to create configured logger. Using emergency logger." in laravel.log every time. with this change the route is gone and the same POST just 404s, watcher back on and it registers like before

fix is moving registerRoutes() into the existing config check

re-file of #974, reviewed and re-tested individually

@pushpak1300
pushpak1300 merged commit 715a21d into laravel:main Sep 3, 2026
24 checks passed
@sulimanbenhalim
sulimanbenhalim deleted the fix/browser-logs-route-when-disabled branch September 3, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants