MediaWiki master
MediaWiki\Logger\LegacySpi Class Reference

The default service provider for MediaWiki\Logger\LoggerFactory, which creates LegacyLogger objects. More...

Inherits MediaWiki\Logger\Spi.

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

The default service provider for MediaWiki\Logger\LoggerFactory, which creates LegacyLogger objects.

Usage:

'class' => \\MediaWiki\\Logger\\LegacySpi::class,
];
$wgMWLoggerDefaultSpi
Config variable stub for the MWLoggerDefaultSpi setting, for use by phpdoc and IDEs.
A helper class for throttling authentication attempts.
Since
1.25
Note
© 2014 Wikimedia Foundation and contributors

Definition at line 40 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 53 of file LegacySpi.php.

◆ setLoggerForTest()

MediaWiki\Logger\LegacySpi::setLoggerForTest ( $channel,
LoggerInterface $logger = null )
Access: internal
For use by MediaWikiIntegrationTestCase
Parameters
string$channel
LoggerInterface | null$logger
Returns
LoggerInterface|null

Definition at line 66 of file LegacySpi.php.

Member Data Documentation

◆ $singletons

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

Definition at line 45 of file LegacySpi.php.


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