MediaWiki  master
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. More...
 

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',
];
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

MediaWiki\Logger\NullSpi::__construct ( )

Definition at line 46 of file NullSpi.php.

Member Function Documentation

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

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: