}
/**
- * Send a line to a supplementary debug log file, if configured, or main debug log if not.
- * To configure a supplementary log file, set $wgDebugLogGroups[$logGroup] to a string
- * filename or an associative array mapping 'destination' to the desired filename. The
- * associative array may also contain a 'sample' key with an integer value, specifying
- * a sampling factor.
+ * Send a line to a supplementary debug log file, if configured, or main debug
+ * log if not.
+ *
+ * To configure a supplementary log file, set $wgDebugLogGroups[$logGroup] to
+ * a string filename or an associative array mapping 'destination' to the
+ * desired filename. The associative array may also contain a 'sample' key
+ * with an integer value, specifying a sampling factor. Sampled log events
+ * will be emitted with a 1 in N random chance.
*
* @since 1.23 support for sampling log messages via $wgDebugLogGroups.
* @since 1.25 support for additional context data
+ * @since 1.25 sample behavior dependent on configured $wgMWLoggerDefaultSpi
*
* @param string $logGroup
* @param string $text
$logger = MWLogger::getInstance( $logGroup );
$context['private'] = ( $dest === 'private' );
- $logger->debug( $text, $context );
+ $logger->info( $text, $context );
}
/**
* change the service provider. If MWLogger::getInstance() is called before
* any service provider has been registered, it will attempt to use the
* $wgMWLoggerDefaultSpi global to bootstrap MWLoggerSpi registration.
- * $wgMWLoggerDefaultSpi 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.
+ * $wgMWLoggerDefaultSpi is expected to be an array usable by
+ * ObjectFactory::getObjectFromSpec() to create a class.
*
* @see MWLoggerSpi
* @since 1.25
/**
* Log message formatter that mimics the legacy log message formatting of
* `wfDebug`, `wfDebugLog`, `wfLogDBError` and `wfErrorLog` global functions by
- * deligating the formatting to MWLoggerLegacyLogger.
+ * delegating the formatting to MWLoggerLegacyLogger.
*
* @since 1.25
* @author Bryan Davis <bd808@wikimedia.org>