Page MenuHomePhabricator

Log load.php exceptions to JavaScript console
Closed, ResolvedPublic

Description

Per earlier comments on T35917, T109008, T110630.

We currently log ResourceLoader exceptions to the debug log server-side.
https://www.mediawiki.org/wiki/Debug#Logging

They're also sent to the client-side wrapped in a block comment prepended to the load.php response. However those aren't very discoverable (digging through network resources to find it). The server-side log is more discoverable but front-end developers may not be used to looking there.

If the response type is JS instead of CSS, let's also send it to the browser console.

The most common issue is a missing file (when making a typo or moving directories, or having files eaten by a virus scanner), so let's make sure at least that kind of exception is logged through this system.

Event Timeline

Krinkle created this task.Aug 28 2015, 10:03 AM
Krinkle claimed this task.
Krinkle raised the priority of this task from to Medium.
Krinkle updated the task description. (Show Details)
Krinkle moved this task to Backlog on the MediaWiki-ResourceLoader board.
Krinkle added subscribers: Krinkle, Spage, Catrope, Bawolff.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 28 2015, 10:03 AM
Krinkle set Security to None.Aug 28 2015, 10:03 AM
Krinkle added a subscriber: Volker_E.

Change 238383 had a related patch set uploaded (by Krinkle):
resourceloader: Log load.php exceptions to JavaScript console

https://gerrit.wikimedia.org/r/238383

Change 238383 merged by jenkins-bot:
resourceloader: Log load.php exceptions to JavaScript console

https://gerrit.wikimedia.org/r/238383

Krinkle closed this task as Resolved.Sep 22 2015, 6:38 PM
Krinkle removed a project: Patch-For-Review.