Merge "Make $wgMWLoggerDefaultSpi more expressive"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 27 Oct 2014 17:08:04 +0000 (17:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 27 Oct 2014 17:08:04 +0000 (17:08 +0000)
1  2 
includes/AutoLoader.php
includes/DefaultSettings.php

diff --combined includes/AutoLoader.php
@@@ -39,6 -39,7 +39,6 @@@ $wgAutoloadLocalClasses = array
        'BloomCache' => 'includes/cache/bloom/BloomCache.php',
        'BloomCacheRedis' => 'includes/cache/bloom/BloomCacheRedis.php',
        'BloomFilterTitleHasLogs' => 'includes/cache/bloom/BloomFilters.php',
 -      'CacheHelper' => 'includes/CacheHelper.php',
        'Category' => 'includes/Category.php',
        'CategoryFinder' => 'includes/CategoryFinder.php',
        'CategoryViewer' => 'includes/CategoryViewer.php',
        'MWHookException' => 'includes/Hooks.php',
        'MWHttpRequest' => 'includes/HttpFunctions.php',
        'MWNamespace' => 'includes/MWNamespace.php',
+       'ObjectFactory' => 'includes/libs/ObjectFactory.php',
        'OutputPage' => 'includes/OutputPage.php',
        'PathRouter' => 'includes/PathRouter.php',
        'PathRouterPatternReplacer' => 'includes/PathRouter.php',
@@@ -3079,7 -3079,6 +3079,7 @@@ $wgEditPageFrameOptions = 'DENY'
   *   - 'DENY': Do not allow framing. This is recommended for most wikis.
   *   - 'SAMEORIGIN': Allow framing by pages on the same domain.
   *   - false: Allow all framing.
 + * Note: $wgBreakFrames will override this for human formatted API output.
   */
  $wgApiFrameOptions = 'DENY';
  
@@@ -5219,38 -5218,21 +5219,21 @@@ $wgDebugLogGroups = array()
  /**
   * Default service provider for creating MWLogger instances.
   *
-  * This can either be the name of a class implementing the MWLoggerSpi
-  * interface with a zero argument constructor or a callable that will return
-  * an MWLoggerSpi instance. Alternately the MWLogger::registerProvider method
-  * can be called to inject an MWLoggerSpi instance into MWLogger and bypass
-  * the use of this configuration variable.
-  *
-  * @since 1.25
-  * @var $wgMWLoggerDefaultSpi string|callable
-  * @see MwLogger
-  */
- $wgMWLoggerDefaultSpi = 'MWLoggerNullSpi';
- /**
-  * Configuration for MWLoggerMonologSpi logger factory.
+  * 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.
   *
-  * Default configuration installs a null handler that will silently discard
-  * all logging events.
+  * Alternately the MWLogger::registerProvider method can be called to inject
+  * an MWLoggerSpi instance into MWLogger and bypass the use of this
+  * configuration variable entirely.
   *
   * @since 1.25
-  * @see MWLoggerMonologSpi
+  * @var array $wgMWLoggerDefaultSpi
+  * @see MwLogger
   */
- $wgMWLoggerMonologSpiConfig = array(
-       'loggers' => array(
-               '@default' => array(
-                       'handlers' => array( 'null' ),
-               ),
-       ),
-       'handlers' => array(
-               'null' => array(
-                       'class' => '\\Monolog\\Logger\\NullHandler',
-               ),
-       ),
+ $wgMWLoggerDefaultSpi = array(
+       'class' => 'MWLoggerNullSpi',
  );
  
  /**