MediaWiki REL1_28
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',
];
See also
\MediaWiki\Logger\LoggerFactory
Since
1.25
Author
Bryan Davis bd808.nosp@m.@wik.nosp@m.imedi.nosp@m.a.or.nosp@m.g
Note
© 2014 Bryan Davis and Wikimedia Foundation.

Definition at line 40 of file NullSpi.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Logger\NullSpi::__construct ( )

Definition at line 47 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 57 of file NullSpi.php.

References MediaWiki\Logger\NullSpi\$singleton.

Member Data Documentation

◆ $singleton

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

Definition at line 45 of file NullSpi.php.

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


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