Merge "resourceloader: Simplify StringSet fallback"
[lhc/web/wiklou.git] / resources / src / startup / mediawiki.log.js
1 /*!
2 * This file is concatenated to mediawiki.js in debug mode.
3 *
4 * See Resources.php.
5 *
6 * @author Michael Dale <mdale@wikimedia.org>
7 * @author Trevor Parscal <tparscal@wikimedia.org>
8 */
9 ( function () {
10 /* global console, mw */
11 /* eslint-disable no-console */
12 var original = mw.log;
13
14 // Replace the mw.log() no-op defined in mediawiki.js, with
15 // a function that logs to console.log (if available).
16 if ( window.console && console.log && console.log.apply ) {
17 mw.log = function () {
18 console.log.apply( console, arguments );
19 };
20 // Re-attach original sub methods
21 mw.log.warn = original.warn;
22 mw.log.error = original.error;
23 mw.log.deprecate = original.deprecate;
24 }
25 }() );