MonologSpi: add support for customizing Monolog\Logger instances
authorBryan Davis <bd808@wikimedia.org>
Sun, 25 Oct 2015 21:39:44 +0000 (15:39 -0600)
committerOri.livneh <ori@wikimedia.org>
Wed, 4 Nov 2015 18:07:19 +0000 (18:07 +0000)
commitf2db70dc14d1ed687d9952587a5710a03162fb9f
tree5445c879c8fa012d18731f32ea89b77184f24ec6
parent7faa829218b1b91296865f36b9ff710e3870b7eb
MonologSpi: add support for customizing Monolog\Logger instances

Proposed upstream changes to Monolog\Logger will require an ability to
call setter methods on newly created Logger instances to tune them for
use in high volume logging situations. Adding support for making these
types of adjustments to MediaWiki's Monolog integration will benefit
users of the updated library when they land upstream.

Arbitrary setters are called by adding a 'calls' array to the logger
specification. This array uses method names as keys and method arguments
as values. This syntax mirrors the setter invocation behavior of
ObjectFactory with the notable omission of Closure expansion in the
argument list before calling the Logger's setter method.

Bug: T116550
Change-Id: I990c7f00f57451f14954542f5404491b2660a0b7
includes/debug/logger/MonologSpi.php