Last modified: 2012-12-09 23:19:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44890, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42890 - Add different log types to mediawiki.log
Add different log types to mediawiki.log
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-09 03:08 UTC by Matthew Flaschen
Modified: 2012-12-09 23:19 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2012-12-09 03:08:38 UTC
It would be useful to add some variants of mw.log to mediaWiki.log.  A possible list is:

mw.logError
mw.logDebug
mw.logInfo
mw.logWarn

The point of this is that various consoles (Firebug, Chrome, etc.) visually distinguish between the types and/or let you filter on them.

The most useful of them would be logError, since it is usually clearly distinguished and people sometimes filter to only show errors.

These could all work by delegating to console.error, console.debug, console.info, console.warn.  

If that method didn't exist, they would fall back on mw.log (which in turn has its own fallback).
Comment 1 Krinkle 2012-12-09 16:16:37 UTC
(Moving to JavaScript since this is not related to the ResourceLoader framework, but one of the javascript modules "mediawiki.log").

What would be the use case / purpose of this?

Also, for modularity, this would be mw.log.error not mw.logError, don't extend the root space.
Comment 2 Matthew Flaschen 2012-12-09 23:19:11 UTC
Consoles often let you filter to see only errors (other types too), and they are usually visually flagged in red.

So, it's useful to allow our code to mark messages as an error.  The same applies to the others (e.g. debug), but to a lesser extent.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links