Merge "Fixed some doc errors in tryNormaliseRedirect()"
[lhc/web/wiklou.git] / includes / poolcounter / PoolWorkArticleView.php
index 54cbb27..d601467 100644 (file)
@@ -142,8 +142,12 @@ class PoolWorkArticleView extends PoolCounterWork {
 
                // Timing hack
                if ( $time > 3 ) {
-                       wfDebugLog( 'slow-parse', sprintf( "%-5.2f %s", $time,
-                               $this->page->getTitle()->getPrefixedDBkey() ) );
+                       // TODO: Use Parser's logger (once it has one)
+                       $logger = MediaWiki\Logger\LoggerFactory::getInstance( 'slow-parse' );
+                       $logger->info( '{time} {title}', array(
+                               'time' => number_format( $time, 2 ),
+                               'title' => $this->page->getTitle()->getPrefixedDBkey(),
+                       ) );
                }
 
                if ( $this->cacheable && $this->parserOutput->isCacheable() && $isCurrent ) {
@@ -154,7 +158,7 @@ class PoolWorkArticleView extends PoolCounterWork {
                // Make sure file cache is not used on uncacheable content.
                // Output that has magic words in it can still use the parser cache
                // (if enabled), though it will generally expire sooner.
-               if ( !$this->parserOutput->isCacheable() || $this->parserOutput->containsOldMagic() ) {
+               if ( !$this->parserOutput->isCacheable() ) {
                        $wgUseFileCache = false;
                }