Merge "Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks"
[lhc/web/wiklou.git] / includes / debug / logger / NullSpi.php
index f725b64..a82d2c4 100644 (file)
  * @file
  */
 
+namespace MediaWiki\Logger;
+
+use Psr\Log\NullLogger;
+
 /**
- * MWLogger service provider that creates \Psr\Log\NullLogger instances.
- * A NullLogger silently discards all log events sent to it.
+ * LoggerFactory service provider that creates \Psr\Log\NullLogger
+ * instances. A NullLogger silently discards all log events sent to it.
  *
  * Usage:
  * @code
  * $wgMWLoggerDefaultSpi = array(
- *   'class' => 'MWLoggerNullSpi',
+ *   'class' => '\\MediaWiki\\Logger\\NullSpi',
  * );
  * @endcode
  *
- * @see MWLogger
+ * @see \MediaWiki\Logger\LoggerFactory
  * @since 1.25
  * @author Bryan Davis <bd808@wikimedia.org>
  * @copyright © 2014 Bryan Davis and Wikimedia Foundation.
  */
-class MWLoggerNullSpi implements MWLoggerSpi {
+class NullSpi implements Spi {
 
        /**
         * @var \Psr\Log\NullLogger $singleton
@@ -43,7 +47,7 @@ class MWLoggerNullSpi implements MWLoggerSpi {
 
 
        public function __construct() {
-               $this->singleton = new \Psr\Log\NullLogger();
+               $this->singleton = new NullLogger();
        }
 
 
@@ -51,7 +55,7 @@ class MWLoggerNullSpi implements MWLoggerSpi {
         * Get a logger instance.
         *
         * @param string $channel Logging channel
-        * @return MWLogger Logger instance
+        * @return \Psr\Log\NullLogger Logger instance
         */
        public function getLogger( $channel ) {
                return $this->singleton;