Throttler: improve log message compatibility with Monolog logger
authorBryan Davis <bd808@wikimedia.org>
Tue, 15 Nov 2016 22:18:08 +0000 (15:18 -0700)
committerGergő Tisza <gtisza@wikimedia.org>
Tue, 15 Nov 2016 22:37:04 +0000 (22:37 +0000)
commita263b8d915ba5dcbbe301a5ef6496e64861645a2
tree189ebc603dd76cc567c1e7129a48dfe5522f3f72
parentd571769c9550d689959bc196ea6f0c31e5770ef6
Throttler: improve log message compatibility with Monolog logger

The `type` log event attribute is used in Wikimedia production logging
to categorize log events by source (e.g. 'mediawiki', 'restbase', etc).
Adding a `type` key to the logging context overwrites the default value
of 'mediawiki'. Rename the key to `throttle` in the context and the
message template.

Change-Id: Ic274159774e43a8749f83c850fff7897956cf377
includes/auth/Throttler.php
tests/phpunit/includes/auth/ThrottlerTest.php