Make $wgMWLoggerDefaultSpi more expressive
authorBryan Davis <bd808@wikimedia.org>
Thu, 23 Oct 2014 03:53:14 +0000 (21:53 -0600)
committerBryan Davis <bd808@wikimedia.org>
Sat, 25 Oct 2014 22:00:06 +0000 (16:00 -0600)
commit51b37035b3ec9befc869e629286b6f8ea4c29437
tree2e4b82f1e3bee6564c442058a7922f03bfa66ba2
parent75a5ef872ae4c4c7c1080bbb220ad2d1be33c165
Make $wgMWLoggerDefaultSpi more expressive

Allow $wgMWLoggerDefaultSpi to specify a more expressive object creation
by introducing a new ObjectFactory class which can process an array of
instructions to call either an object constructor or a factory method
with an array of arguments. This allows removal of the
$wgMWLoggerMonologSpiConfig global variable in favor of configuration
using $wgMWLoggerDefaultSpi.

New classes introduced:
; ObjectFactory
: Construct objects from configuration instructions.

Change-Id: If56cce5dcb1ad5712e238d6e2dab809a351f79be
docs/mwlogger.txt
includes/AutoLoader.php
includes/DefaultSettings.php
includes/debug/logger/Logger.php
includes/debug/logger/NullSpi.php
includes/debug/logger/monolog/Spi.php
includes/libs/ObjectFactory.php [new file with mode: 0644]