Index: trunk/phase3/resources/mediawiki/mediawiki.log.js |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | * Implementation for mediaWiki.log stub |
4 | 4 | */ |
5 | 5 | |
6 | | -(function ($) { |
| 6 | +(function( $ ) { |
7 | 7 | |
8 | 8 | /** |
9 | 9 | * Log output to the console. |
— | — | @@ -15,11 +15,9 @@ |
16 | 16 | * @author Trevor Parscal <tparscal@wikimedia.org> |
17 | 17 | * @param {string} string Message to output to console |
18 | 18 | */ |
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' ) ) { |
24 | 22 | string = mw.config.get( 'mw.log.prefix' ) + '> ' + string; |
25 | 23 | } |
26 | 24 | // Try to use an existing console |