MediaWiki REL1_35
MediaWiki\Logger\Spi Interface Reference

Service provider interface for \Psr\Log\LoggerInterface implementation libraries. More...

Inheritance diagram for MediaWiki\Logger\Spi:

Public Member Functions

 getLogger ( $channel)
 Get a logger instance.
 

Detailed Description

Service provider interface for \Psr\Log\LoggerInterface implementation libraries.

MediaWiki can be configured to use a class implementing this interface to create new \Psr\Log\LoggerInterface instances via either the $wgMWLoggerDefaultSpi global variable or code that constructs an instance and registers it via the LoggerFactory::registerProvider() static method.

See also
\MediaWiki\Logger\LoggerFactory Stable to implement
Since
1.25
Note
© 2014 Wikimedia Foundation and contributors

Definition at line 38 of file Spi.php.

Member Function Documentation

◆ getLogger()

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

Get a logger instance.

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

Implemented in MediaWiki\Logger\ConsoleSpi, MediaWiki\Logger\LegacySpi, MediaWiki\Logger\LogCapturingSpi, MediaWiki\Logger\MonologSpi, and MediaWiki\Logger\NullSpi.

Referenced by MediaWiki\Logger\LogCapturingSpi\createLogger().


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