MediaWiki REL1_35
MediaWiki\Logger\LegacySpi Class Reference

LoggerFactory service provider that creates LegacyLogger instances. More...

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

Public Member Functions

 getLogger ( $channel)
 Get a logger instance.
 
 setLoggerForTest ( $channel, LoggerInterface $logger=null)
 

Protected Attributes

array $singletons = []
 

Detailed Description

LoggerFactory service provider that creates LegacyLogger instances.

Usage:

'class' => \\MediaWiki\\Logger\\LegacySpi::class,
];
$wgMWLoggerDefaultSpi
Default service provider for creating Psr\Log\LoggerInterface instances.
A helper class for throttling authentication attempts.
See also
\MediaWiki\Logger\LoggerFactory
Since
1.25
Note
© 2014 Wikimedia Foundation and contributors

Definition at line 39 of file LegacySpi.php.

Member Function Documentation

◆ getLogger()

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

Get a logger instance.

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

Implements MediaWiki\Logger\Spi.

Definition at line 52 of file LegacySpi.php.

◆ setLoggerForTest()

MediaWiki\Logger\LegacySpi::setLoggerForTest (   $channel,
LoggerInterface  $logger = null 
)

Definition at line 65 of file LegacySpi.php.

Member Data Documentation

◆ $singletons

array MediaWiki\Logger\LegacySpi::$singletons = []
protected

Definition at line 44 of file LegacySpi.php.


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