debug: Interpolate log messages
authorKunal Mehta <legoktm@member.fsf.org>
Wed, 24 Aug 2016 23:12:02 +0000 (16:12 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Wed, 24 Aug 2016 23:22:52 +0000 (16:22 -0700)
Change-Id: Ib61a50863022db796d69264bf738fb0b22f776e9

includes/debug/MWDebug.php

index 8acf04e..8c019d8 100644 (file)
@@ -20,6 +20,8 @@
  * @file
  */
 
+use MediaWiki\Logger\LegacyLogger;
+
 /**
  * New debugger system that outputs a toolbar on page view.
  *
@@ -334,6 +336,7 @@ class MWDebug {
                                if ( isset( $context['seconds_elapsed'] ) && isset( $context['memory_used'] ) ) {
                                        $prefix .= "{$context['seconds_elapsed']} {$context['memory_used']}  ";
                                }
+                               $str = LegacyLogger::interpolate( $str, $context );
                                $str = $prefix . $str;
                        }
                        self::$debug[] = rtrim( UtfNormal\Validator::cleanUp( $str ) );