r106922 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106921‎ | r106922 | r106923 >
Date:02:40, 21 December 2011
Author:tstarling
Status:ok
Tags:
Comment:
Log the reason for a LocalisationCache recache to a special debug log group, for incident response
Modified paths:
  • /branches/wmf/1.18wmf1/includes/LocalisationCache.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/LocalisationCache.php
@@ -312,13 +312,13 @@
313313 */
314314 public function isExpired( $code ) {
315315 if ( $this->forceRecache && !isset( $this->recachedLangs[$code] ) ) {
316 - wfDebug( __METHOD__."($code): forced reload\n" );
 316+ wfDebugLog( 'lc-recache', __METHOD__."($code): forced reload\n" );
317317 return true;
318318 }
319319
320320 $deps = $this->store->get( $code, 'deps' );
321321 if ( $deps === null ) {
322 - wfDebug( __METHOD__."($code): cache missing, need to make one\n" );
 322+ wfDebugLog( 'lc-recache', __METHOD__."($code): cache missing, need to make one\n" );
323323 return true;
324324 }
325325 foreach ( $deps as $dep ) {
@@ -327,7 +327,7 @@
328328 // anymore (e.g. uninstalled extensions)
329329 // When this happens, always expire the cache
330330 if ( !$dep instanceof CacheDependency || $dep->isExpired() ) {
331 - wfDebug( __METHOD__."($code): cache for $code expired due to " .
 331+ wfDebugLog( 'lc-recache', __METHOD__."($code): cache for $code expired due to " .
332332 get_class( $dep ) . "\n" );
333333 return true;
334334 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r106927Reverted r106922 and log actual calls to recache() instead, since shallow fal...tstarling03:29, 21 December 2011

Status & tagging log