MediaWiki master
|
Service provider interface to create \Psr\Log\LoggerInterface objects. More...
Inherited by MediaWiki\Logger\ConsoleSpi, MediaWiki\Logger\LegacySpi, MediaWiki\Logger\LogCapturingSpi, MediaWiki\Logger\MonologSpi, and MediaWiki\Logger\NullSpi.
Public Member Functions | |
getLogger ( $channel) | |
Get a logger instance. | |
Service provider interface to create \Psr\Log\LoggerInterface objects.
MediaWiki can be configured to use a class implementing this interface via the $wgMWLoggerDefaultSpi configuration variable.
This configuration is consumed by MediaWiki\Logger\LoggerFactory, which is where we create logger objects.
While not recommended in production code, you can construct and install an Spi class at runtime via MediaWiki\Logger\LoggerFactory::registerProvider (e.g. to power debug features in PHPUnit bootstrapping, or Maintenance scripts).
MediaWiki\Logger\Spi::getLogger | ( | $channel | ) |
Get a logger instance.
string | $channel | Logging channel |
Implemented in MediaWiki\Logger\ConsoleSpi, MediaWiki\Logger\LegacySpi, MediaWiki\Logger\LogCapturingSpi, MediaWiki\Logger\MonologSpi, and MediaWiki\Logger\NullSpi.