r84277 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84276‎ | r84277 | r84278 >
Date:22:22, 18 March 2011
Author:krinkle
Status:ok
Tags:
Comment:
Follow-up r83658 CR: Undoing addition of second argument, prefix is for identifying the source window, not the context within
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.log.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.log.js
@@ -2,7 +2,7 @@
33 * Implementation for mediaWiki.log stub
44 */
55
6 -(function ($) {
 6+(function( $ ) {
77
88 /**
99 * Log output to the console.
@@ -15,11 +15,9 @@
1616 * @author Trevor Parscal <tparscal@wikimedia.org>
1717 * @param {string} string Message to output to console
1818 */
19 - mw.log = function( string, prefix ) {
20 - // Allow log messages to use a configured prefix
21 - if ( typeof prefix == 'string' ) {
22 - string = prefix + '> ' + string;
23 - } else if ( mw.config.exists( 'mw.log.prefix' ) ) {
 19+ mw.log = function( string ) {
 20+ // Allow log messages to use a configured prefix to identify the source window (ie. frame)
 21+ if ( mw.config.exists( 'mw.log.prefix' ) ) {
2422 string = mw.config.get( 'mw.log.prefix' ) + '> ' + string;
2523 }
2624 // Try to use an existing console

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83658Fixing minor issues with mw.loader...krinkle18:49, 10 March 2011

Status & tagging log