Page MenuHomePhabricator

Allow post-initialization configuration of MonologSpi
Closed, ResolvedPublic

Description

The current implementation of the MediaWiki\Logger\MonologSpi does not provide a mechanism for altering the configuration data or underlying Monolog system after the initial creation of the object. This makes runtime conditional logging changes essentially impossible.

Currently there have been two use cases identified where this behavior would be useful in the WMF production cluster:

  • Historically it has been useful to debug Wikitech LDAP issues with local file logging on the Wikitech server. Thus far we have not been able to devise a method of adding to the Monolog configuration to allow this.
  • Sending metrics to statsd to track time rate of change for interesting events could be implemented by adding structured logging in appropriate places to the codebase and attaching a custom Monolog Handler to the appropriate logging channels. For installations not wishing to use Monolog and/or statsd these events would still be available to the logging layer for recording in a file or other data sink.

Event Timeline

bd808 created this task.Jul 2 2015, 4:26 PM
bd808 claimed this task.
bd808 raised the priority of this task from to Normal.
bd808 updated the task description. (Show Details)
bd808 added a project: MediaWiki-Debug-Logger.
bd808 added a subscriber: bd808.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 2 2015, 4:26 PM

Change 222501 had a related patch set uploaded (by BryanDavis):
MonologSpi: Add method to provide additional configuration

https://gerrit.wikimedia.org/r/222501

Tgr added a subscriber: Tgr.Jul 2 2015, 11:44 PM

Change 222501 merged by jenkins-bot:
MonologSpi: Add method to provide additional configuration

https://gerrit.wikimedia.org/r/222501

bd808 moved this task from In Dev/Progress to Done on the User-bd808 board.Jul 23 2015, 3:31 PM
bd808 closed this task as Resolved.Jul 23 2015, 10:13 PM
bd808 moved this task from Done to Archive on the User-bd808 board.Jul 24 2015, 5:18 PM