The MediaWiki ecosystem has some highly sophisticated loggin/debugging/error reporting tools such as the ELK stack, but they are nontrivial to set up and an effort to use (you need to go to the aggregation site and search for your error or log message, instead of just having it right on the wiki page where the error happened). It would be nice to integrate some modern error display / debug tool into MediaWiki for casual development - probably as an extension, since such tools tend to be insecure. A few possibilities:
Description
Details
Related Objects
- Mentioned In
- rEWOP7a18a1d136cf: Create extension files
rEWOP526b0f6ef32a: Create extension files
rEWOP593efb05c76a: Create extension files
T158148: Promote Developer Wishlist 2017 proposals
T158149: Find an owner for top 10 Developer Wishlist 2017 proposals - Mentioned Here
- T153256: Unable to overwrite services using MediaWikiServices hook
T177735: Error handling is set up too late to catch extension registration errors
T158149: Find an owner for top 10 Developer Wishlist 2017 proposals
Event Timeline
The debug toolbar should emit all log messages to the current page, and it also works with API requests. Did you have something else in mind?
Errors, specifically, not normal logs. Error logger tools tend to have some nice features:
- show code context for the stack trace
- show detailed information about the parameters in the stack trace, with some GUI to manage the huge amount of information
- IDE integration so that you can click on the stack trace and open the location in your editor
Also, they don't require you to enable the debug toolbar and then reproduce the error.
This proposal is selected for the Developer-Wishlist voting round and will be added to a MediaWiki page very soon. To the subscribers, or proposer of this task: please help modify the task description: add a brief summary (10-12 lines) of the problem that this proposal raises, topics discussed in the comments, and a proposed solution (if there is any yet). Remember to add a header with a title "Description," to your content. Please do so before February 5th, 12:00 pm UTC.
This was the fifth most popular item in the Developer Wishlist results. I might work on this (but won't fight if anyone else wants to).
Seems fairly simple: find a way to allow extensions to replace MWExceptionRenderer (hook? MediaWikiServices::redefineService? the first is ugly, the second seems a bit scary), define an interface for replacements, write an extension which uses whoops to display the error (in the wiki content area if OutputPage can be used, on the full page otherwise).
Change 355033 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/vagrant@master] Add whoops role
Change 355061 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] Turn MWExceptionRenderer into a service
Change 355062 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/Whoops@master] Create extension files
Change 355063 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[integration/config@master] Set up CI for Whoops extension
Change 355063 merged by jenkins-bot:
[integration/config@master] Set up CI for Whoops extension
In relation to T158149: Find an owner for top 10 Developer Wishlist 2017 proposals, I dare to ask: what is the current status? :)
See Whoops and https://gerrit.wikimedia.org/r/#/c/355062/. Needs some more work, I'm pretty confident I'll get it done by the end of the year.
FirePHP is a logger, not an error renderer. IIRC there's a Monolog handler for it so MediaWiki can already be configured to use it.