mediawiki.js: Refactor definition of mw.log singleton
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 23 Sep 2016 19:40:10 +0000 (20:40 +0100)
committerKrinkle <krinklemail@gmail.com>
Fri, 23 Sep 2016 20:35:07 +0000 (20:35 +0000)
commit9bce2438d81066ce526cf0831e73b48aa3b356e5
treebc14ee0e3e93470ef11c85e84541cb20e86fe17e
parentbd08b62c598cea900df875913ce9a64674ddddb6
mediawiki.js: Refactor definition of mw.log singleton

Move this out of the large plain object that defines 'mw' itself
because right now none of the mw object initialisation is able
to call mw.log.

In a future commit, a call to mw.log is introduced in the mw.Map()
constructor, which is also used to set the mw.messages, mw.templates
and mw.user.options fields.

* Rename the other log() function to avoid clashing.
* Update outdated comment about not using mw.log() which was
  there about confusion between log() and mw.log(). However,
  this code was updated long ago to use mw.track() instead of
  log() directly, and log() has now been renamed.

Change-Id: I7d6bd4e3c9753e30278752c59d6cbd4d2fd10d96
resources/src/mediawiki/mediawiki.js
resources/src/mediawiki/mediawiki.log.js