Manual:$wgMWLoggerDefaultSpi

From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎español • ‎日本語 • ‎polski
Debug/logging: $wgMWLoggerDefaultSpi
Default service provider for creating MWLogger instances.
Introduced in version: 1.25.0
Removed in version: still in use
Allowed values:
Default value: [ 'class' => '\\MediaWiki\\Logger\\LegacySpi', ]
Other settings: Alphabetical | By function

Details[edit]

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' => ... ];

See also[edit]