MediaWiki REL1_32
MediaWiki\Logger\NullSpi Class Reference

LoggerFactory service provider that creates \Psr\Log\NullLogger instances. More...

Inheritance diagram for MediaWiki\Logger\NullSpi:
Collaboration diagram for MediaWiki\Logger\NullSpi:

Public Member Functions

 __construct ()
 
 getLogger ( $channel)
 Get a logger instance.
 

Protected Attributes

 $singleton
 

Detailed Description

LoggerFactory service provider that creates \Psr\Log\NullLogger instances.

A NullLogger silently discards all log events sent to it.

Usage:

$wgMWLoggerDefaultSpi = [
    'class' => \\MediaWiki\\Logger\\NullSpi::class,
];
See also
\MediaWiki\Logger\LoggerFactory
Since
1.25
Note
© 2014 Wikimedia Foundation and contributors

Definition at line 39 of file NullSpi.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Logger\NullSpi::__construct ( )

Definition at line 46 of file NullSpi.php.

Member Function Documentation

◆ getLogger()

MediaWiki\Logger\NullSpi::getLogger ( $channel)

Get a logger instance.

Parameters
string$channelLogging channel
Returns
\Psr\Log\NullLogger Logger instance

Implements MediaWiki\Logger\Spi.

Definition at line 56 of file NullSpi.php.

References MediaWiki\Logger\NullSpi\$singleton.

Member Data Documentation

◆ $singleton

Psr Log NullLogger MediaWiki\Logger\NullSpi::$singleton
protected

Definition at line 44 of file NullSpi.php.

Referenced by MediaWiki\Logger\NullSpi\getLogger().


The documentation for this class was generated from the following file: