Jump to content

Handbuch:$wgMWLoggerDefaultSpi

From mediawiki.org
This page is a translated version of the page Manual:$wgMWLoggerDefaultSpi and the translation is 50% complete.
Debug: $wgMWLoggerDefaultSpi
Default service provider for creating MWLogger instances.
Eingeführt in Version:1.25.0 (Gerrit change 119940; git #9b358016)
Entfernt in Version:Weiterhin vorhanden
Erlaubte Werte:Nicht angegeben
Standardwert:siehe unten

Details

The value should be an array suitable for use with ObjectFactory::getObjectFromSpec(). The created object is expected to implement the MWLoggerSpi interface. Siehe ObjectFactory für weitere Details.

NullSpi creates MWLogger instances that will discard all logging events.

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

LegacySpi (default) creates LegacyLogger instances which mimic the historic implementation of MediaWiki's wfErrorLog logging implementation.

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

MWLoggerMonologSpi creates loggers implemented by Monolog.

Siehe Manual:MWLoggerMonologSpi für Konfigurationseinstellungen.

$wgMWLoggerDefaultSpi = [ 'class' => '\\MediaWiki\\Logger\\MonologSpi', 'args' => ... ];


Standardwert

MediaWiki Version:
1.39
$wgMWLoggerDefaultSpi = [ 'class' => 'MediaWiki\\Logger\\LegacySpi', ]
MediaWiki Versions:
1.31 – 1.38
$wgMWLoggerDefaultSpi = [
	'class' => \MediaWiki\Logger\LegacySpi::class,
]
MediaWiki Versions:
1.25 – 1.30
$wgMWLoggerDefaultSpi = array(
	'class' => '\\MediaWiki\\Logger\\LegacySpi',
)

Siehe auch