use ParserCache;
use ParserOptions;
use ParserOutput;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
use RecentChangesUpdateJob;
use ResourceLoaderWikiModule;
use Revision;
* @since 1.32
* @ingroup Page
*/
-class DerivedPageDataUpdater implements IDBAccessObject {
+class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface {
/**
* @var UserIdentity|null
*/
private $loadbalancerFactory;
+ /**
+ * @var LoggerInterface
+ */
+ private $logger;
+
/**
* @var string see $wgArticleCountMethod
*/
// XXX only needed for waiting for replicas to catch up; there should be a narrower
// interface for that.
$this->loadbalancerFactory = $loadbalancerFactory;
+ $this->logger = new NullLogger();
+ }
+
+ public function setLogger( LoggerInterface $logger ) {
+ $this->logger = $logger;
}
/**
if ( $stashedEdit ) {
/** @var ParserOutput $output */
$output = $stashedEdit->output;
-
// TODO: this should happen when stashing the ParserOutput, not now!
$output->setCacheTime( $stashedEdit->timestamp );
$renderHints['known-revision-output'] = $output;
+
+ $this->logger->debug( __METHOD__ . ': using stashed edit output...' );
}
// NOTE: we want a canonical rendering, so don't pass $this->user or ParserOptions