Log JSON-formatted exceptions to 'exception-json' log bucket
authorOri Livneh <ori@wikimedia.org>
Sat, 27 Jul 2013 18:55:48 +0000 (11:55 -0700)
committerOri Livneh <ori@wikimedia.org>
Tue, 5 Nov 2013 20:40:24 +0000 (12:40 -0800)
commit4ae6be7f92972dce0da326288971244aeeabb340
tree84dfab0f9cc62a3744df844e648681131dfe3233
parentedac6c37166cdd6da87e5ff33db97200526ab3a8
Log JSON-formatted exceptions to 'exception-json' log bucket

Much of the original scope of this patch has been made redundant by other
patches, so it's nice and compact now. This patch makes MediaWiki serialize
exceptions to JSON and log them to an 'exception-json' log group.

To facilitate this, two related changes are included:

* Consolidated the code for annotating the exception with the request URL (if
  the exception was encountered while responding to a request) in a method,
  Exception->getURL.

* Removed the code path that checked for a falsey return value from
  $wgRequest->getRequestURL() and set the url to '[no URL]'. ('[no req]' is
  retained.) Nowadays getRequestURL() always returns a string (or throws an
  exception). Wikimedia's cluster doesn't have a single '[no URL]' in its log
  archives, which go back several months.

Change-Id: Iacda90fb401f6a45ed1ac1a991e0884663e6c0bf
RELEASE-NOTES-1.23
includes/Exception.php