Manual:$wgMWLoggerDefaultSpi/ru

This page is a translated version of the page Manual:$wgMWLoggerDefaultSpi and the translation is 7% complete.
Отлаживание: $wgMWLoggerDefaultSpi
Default service provider for creating MWLogger instances.
Введено в версии:1.25.0 (Gerrit change 119940; git #9b358016)
Удалено в версии:все еще используется
Допустимые значения:не определено
Значение по умолчанию:see below

Details

The value should be an array suitable for use with ObjectFactory::getObjectFromSpec(). The created object is expected to implement the MWLoggerSpi interface. See ObjectFactory for additional details.

$wgMWLoggerDefaultSpi = [ 'class' => '\\MediaWiki\\Logger\\NullSpi', ];

NullSpi creates MWLogger instances that will discard all logging events.

$wgMWLoggerDefaultSpi = [ 'class' => '\\MediaWiki\\Logger\\LegacySpi', ];
  • LegacySpi (default) creates LegacyLogger instances which mimic the historic implementation of MediaWiki's wfErrorLog logging implementation.
$wgMWLoggerDefaultSpi = [ 'class' => '\\MediaWiki\\Logger\\MonologSpi', 'args' => ... ];
  • MWLoggerMonologSpi creates loggers implemented by Monolog.

See Manual:MWLoggerMonologSpi for configuration settings.

Default value

Версия MediaWiki:
1.31
[
	'class' => \MediaWiki\Logger\LegacySpi::class,
]
Версии MediaWiki:
1.25 – 1.30
array(
	'class' => '\\MediaWiki\\Logger\\LegacySpi',
)

См. также