debug: Allow the DBQuery channel to be used
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 14 Sep 2018 23:02:12 +0000 (00:02 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 14 Sep 2018 23:47:25 +0000 (00:47 +0100)
commitc58afe45b06ce1e380f55e40c0becb3ef930f709
treef21ad04ba14b6c693fb44264f97997acf1fcba00
parentfb43ee2a0603e9a52ac6d90aeed2d47e77054dd8
debug: Allow the DBQuery channel to be used

Follows-up 81e8d7af4129eb56 and e861191b2cdceeeecee.

When using $wgShowDebug, $wgDebugComments, or $wgDebugLogFile
locally, or when using the 'log' attribute with X-Wikimedia-Debug,
all channels should be enabled and logged. But, the DBQuery logs
are currently going nowhere.

The code for MWDebug::query() is intercepting it, even if
$wgDebugToolbar is not enabled.

And after that, the code for wfLogDBError was intercepting it,
again, even if $wgDBerrorLog is not enabled.

Bug: T202764
Change-Id: I710c26a9e9c30fea20975d1bc24e1f0af077c2ad
includes/debug/MWDebug.php
includes/debug/logger/LegacyLogger.php