When enabling memcached debug logs ($wgMemCachedDebug), they are
unconditionally sent to the main $wgDebugLogFile. This patch make it
possible to sent thoses specific log to an alternate file by setting
$wgDebugLogGroups['memcached']
Change-Id: I85d8ab92471ce3c31f8168dae83fe91e95e18dce
* (bug 27757) new API command just for retrieving tokens (not page-based)
* Added GitViewers hook for extensions using external git repositories to have a web-based
repository viewer linked to from Special:Version.
+* Memcached debug logs can now be sent to their own file logs by setting
+ $wgDebugLogFile['memcached'] to some filepath.
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
// }}}
class MemCachedClientforWiki extends MWMemcached {
+
function _debugprint( $text ) {
- wfDebug( "memcached: $text" );
+ global $wgDebugLogGroups;
+ if( !isset( $wgDebugLogGroups['memcached'] ) ) {
+ # Prefix message since it will end up in main debug log file
+ $text = "memcached: $text";
+ }
+ wfDebugLog( 'memcached', $text );
}
}