Manual:$wgMWLoggerDefaultSpi

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgMWLoggerDefaultSpi and the translation is 29% complete.
Other languages:
English • ‎Nederlands • ‎español • ‎magyar • ‎polski • ‎日本語
Debug/logging: $wgMWLoggerDefaultSpi
Default service provider for creating MWLogger instances.
Introducido en la versión:1.25.0
Eliminado en la versión:aún se usa
Valores permitidos:no especificado
Valor predeterminado:see below

Detalles

The value should be an array suitable for use with ObjectFactory::getObjectFromSpec(). The created object is expected to implement the MWLoggerSpi interface. Véase ObjectFactory para más detalles.

$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

Versión de MediaWiki:
1.31
[
	'class' => \MediaWiki\Logger\LegacySpi::class,
]
Versiones de MediaWiki:
1.25 – 1.30
array(
	'class' => '\\MediaWiki\\Logger\\LegacySpi',
)

Véase también