This way the time and title values are transmitted via Monolog
as separate JSON properties.
Keep the message the same for backwards-compatibility (except
for the space padding).
Change-Id: I0b79944bb9944dc6d09d16fe2ecc845e0e0e2afb
// 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 ) {